Skip to content

Configuration

Dannes Wessels edited this page Nov 20, 2016 · 10 revisions

Only the four configuration parameters mentioned in the following table a required for every JMS connection (for both messaging and replication). Please consult the linked documentation for more information.

Mandatory configuration properties
Parameter Description Example Reference
connection-factory The name of the connection factory. ConnectionFactory Javadoc
destination The name of the (JMS) Queue or Topic. dynamicQueues/eXistdb-messaging-demo
dynamicTopics/eXistdb-replication-demo
Javadoc
java.naming.factory.initial The initial context factory to use. The value must be the fully qualified class name of the factory class that will create an initial context. org.apache.activemq.jndi.ActiveMQInitialContextFactory Javadoc
java.naming.provider.url The service provider to use. The value of the property should contain a URL string. tcp://localhost:61616 ActiveMQ

The next parameters are optional and can be used to customise the JMS connection.

Optional configuration properties
Parameter Description Reference
connection.client-id Sets the client identifier for new connection. The ID must be unique for all connections and is required for (durable) Topics. Javadoc
connection.password Password for creating a new connection. Username is required. Javadoc
connection.username Username for creating a new connection, Password is required. Javadoc
consumer.message-selector Only messages with properties matching the message selector expression are delivered. No value or an empty string indicates that there is no message selector for the message consumer. JEE tutorial
producer.priority Priority of a message. Value ranged 0-9, default is 4. Javadoc
producer.time-to-live Maximum time to live for a message. Javadoc
subscriber.durable Set to 'true' to create durable subscriber to a Topic. Default is 'true', set to 'false' to create a normal consumer to a topic. Value 'true' is used by default for replication. Javadoc
subscriber.name Name used to identify this subscription, required for (durable) Topics. Javadoc
Clone this wiki locally