URI structure
Basically, the URI structure of a SOAP over JMS address looks like the following structure:
jms:<variant>:<destination_name>?jndiInitialContextFactory=<context_factory_class_name>&jndiConnectionFactoryName=
<connection_factory_name>&jndiURL=<JMS_broker_URL>
Where:
-
variant can have the following values:
Variant Description jndi Destination name is a jndi queue name jndi-topic Destination name is a jndi topic name queue Destination is a queue name resolved using JMS topic Destination is a topic name resolved using JMS -
destination_name is basically the queue or topic name.
-
context_factory_class_name is the class name of a JNDI context factory which will be used to resolve a factory which creates connections to the broker.
-
connection_factory_name is a platform-specific connection factory name (differs for Active MQ and Websphere MQ)
-
JMS_broker_URL is a URL which will be used by the context resolve or create connection factory and destination objects.
But CXF provides the possibility to specify further JMS parameters:
Query Parameter | Default Value | Description |
---|---|---|
conduitIdSelectorPrefix | If set then this string will be the prefix for all correlation ids the conduit creates and also be used in the selector for listening to replies | |
deliveryMode | PERSISTENT |
NON_PERSISTENT messages will kept only in memory PERSISTENT messages will be saved to disk |
durableSubscriptionClientId | Optional Client identifier for the connection. The purpose is to associate a connection with a state maintained on behalf of the client by a provider. The only such state identified by the JMS API is that required to support durable subscriptions. | |
durableSubscriptionName | Specifies the name used to register a durable subscription. | |
jndiConnectionFactoryName | ConnectionFactory | Specifies the JNDI name bound to the JMS connection factory to use when connecting to the JMS destination. |
jndiInitialContextFactory | Specifies the fully qualified Java class name of the "InitialContextFactory" implementation class to use. | |
jndiURL | Specifies the JNDI provider URL | |
jndi-* | Additional parameters for a JNDI provider | |
messageType | byte | JMS message type used by CXF (byte, text or binary) |
password | Password for creating the connection. Using this in the URI is discouraged | |
priority | 4 | Priority for the messages. See your JMS provider documentation for details. Values range from 0 to 9 where 0 is lowest priority |
replyToName | Specifies the JNDI name bound to the JMS destinations where replies are sent | |
receiveTimeout | 60000 | Timeout in milliseconds the client waits for a reply in case of request / repy exchanges |
reconnectOnException | true | Should the transport reconnect in case of exceptions. From version 3.0.0 on the transport will always reconnect in case of exceptions |
targetService | Used by the service implementation to dispatch the service request. | |
timeToLive | 0 | Time (in ms) after which the message will be discarded by the jms provider |
topicReplyToName | Reply to messages on a topic with this name. Depending on the variant this is either a jndi or jms name. | |
useConduitIdSelector | true |
Each conduit is assigned with a UUID. If set to true this conduit id will be the prefix for all correlation ids. This allows several endpoints to share a JMS queue or topic |
username | Username for creating the connection |
Some of these attributes are specified in the JMS URI specification.
Further parameters are supported by the underlying CXF 3.x, namely jndiTransactionManager, which allows the configuration of JTA transactions around JMS message processing. However, this is an advanced feature for which it is recommended to read the CXF documentation and the documentation of the MOM in use.
Depending of the MOM used, the connection URI can look differently. For more information on how the address URI for connection to Active MQ looks like, see Connecting to ActiveMQ, and for more information on how the address URI for connection to Websphere MQ looks like, see Connecting to Websphere MQ.