Messaging: configuration

The following configuration parameters are used by the messaging functions and the replication feature.

Mandatory configuration properties

The following properties need to be set for each connection: messaging and replication, by producer (master) and consumer (slave).

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/eXistdbTest 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

Optional configuration properties

The following properties are optional and can be used to fine-tune the connection. Note that 'subscriber.name' and 'connection.client-id' are required when connecting to a (durable) Topic.

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 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. Javadoc
subscriber.name Name used to identify this subscription, required for Topics. Javadoc

Advanced configuration properties

Use the following properties with care.

Advanced options
Parameter Description Reference
exist.connection.pool Enable connection pooling and reuse JMS objects. Valid value is "yes" or "true". For ActiveMQ only. Javadoc