public class HornetNest extends Object
EmbeddedJMS to
sensible values so you do not have to.
This class also implements a Command Pattern for ease of writing asynchronous code.| Constructor and Description |
|---|
HornetNest(String dataDirectory,
boolean useLibAio,
QueueConfig... queueConfigs)
Creates and configures a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
org.hornetq.core.config.Configuration |
getConfig()
Use to set additional configuration.
|
org.hornetq.jms.server.config.JMSConfiguration |
getJmsConfig()
Use to set additional configuration.
|
void |
send(String queueName,
Command command)
Sends a command into a queue for processing
|
void |
send(String queueName,
Command command,
int deliveryMode)
Sends a command into a queue for processing
|
void |
send(String queueName,
Command command,
int deliveryMode,
int priority,
int timeToLive)
Sends a command into a queue for processing
|
void |
stop()
Stops this JMS server.
|
public HornetNest(String dataDirectory, boolean useLibAio, QueueConfig... queueConfigs)
dataDirectory - root directory where persistent messages are storeduseLibAio - true to use libaio, false if not installed.
See Libaio Native LibrariesqueueConfigs - vararg of QueueConfig> instances.public void send(String queueName, Command command)
queueName - name of queuecommand - command instance.public void send(String queueName, Command command, int deliveryMode)
queueName - name of queuecommand - command to processdeliveryMode - delivery mode: DeliveryMode.public void send(String queueName, Command command, int deliveryMode, int priority, int timeToLive)
queueName - name of queuecommand - command to processdeliveryMode - delivery mode: DeliveryMode.priority - priority of the message. Correct values are from 0 to 9, with higher number denoting a
higher priority.timeToLive - the message's lifetime (in milliseconds, where 0 is to never expire)public void stop()
public org.hornetq.jms.server.config.JMSConfiguration getJmsConfig()
public org.hornetq.core.config.Configuration getConfig()
Copyright © 2016. All rights reserved.