URI structure - 6.3

Talend ESB Service Developer Guide

Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Design and Development
Installation and Upgrade
Talend ESB

Basically, the URI structure of a SOAP over JMS address looks like the following structure:



  • variant can have the following values:

    jndiDestination name is a jndi queue name
    jndi-topicDestination name is a jndi topic name
    queueDestination is a queue name resolved using JMS
    topicDestination 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 ParameterDefault ValueDescription
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

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.
jndiConnectionFactoryNameConnectionFactorySpecifies 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
messageTypebyteJMS message type used by CXF (byte, text or binary)
password Password for creating the connection. Using this in the URI is discouraged
priority4Priority 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
receiveTimeout60000Timeout in milliseconds the client waits for a reply in case of request / repy exchanges
reconnectOnExceptiontrueShould 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.
timeToLive0Time (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.

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.

Connecting to ActiveMQ

For connection to ActiveMQ:

  • JMS_broker_URL for ActiveMQ has the following structure:

  • connection_factory_class_name should be org.apache.activemq.jndi.ActiveMQInitialContextFactory.

  • connection_factory_name is usually ConnectionFactory.

  • variant should take the jndi or jndi-topic value to connect to a queue or a topic respectively. However, queue or topic work also for ActiveMQ.

In case of connection to a dynamic queue/topic, the destination name needs to be prefixed with dynamicQueues/ or dynamicTopics/ respectively.

Below is an example of connection to a ActiveMQ dynamic queue called "test.queue" with a broker running on the localhost port 61616:

ActiveMQ connection to queue URI


Below is an example of connection to the dynamic topic "test.topic" with the broker running on localhost port 61616:

ActiveMQ connection to a topic URI


Connecting to Websphere MQ

For connection to Websphere MQ:

  • JMS_broker_URL is either not set at all, or needs to have the same value as the clientConnection parameter:

  • context_factory_class_name should be org.talend.esb.jms.wmq.Nojndi.

    This is a wrapper around the pseudo InitialContextFactory Nojndi from IBM which is included in the Websphere MQ JMS support libraries. The Talend ESB Nojndi wrapper is included in the Talend ESB Runtime Enterprise Edition in the file tesb-jms-transport-enterprise.jar. It adds topic destination support to the wrapped IBM Nojndi and a workaround which avoids some spurious error messages the IBM Nojndi tends to write to stderr.

  • connection_factory_name is a Websphere MQ-specific connection parameter string which is equal to the Websphere MQ connection access strings used by non-JMS clients.

    The Websphere MQ connection parameter string looks like the following:



    • For connectQueueManager, (<queue_manager>) is the name of the Websphere MQ queue manager which manages the requested destination, for example: QMGR, QM01 or something similar.

    • For binding, (client) should be set to the literal value client for JMS.

    • For clientChannel, (<channel_name>) is the name or the Websphere MQ channel through which the requested destination is to be accessed, for example: EXAMPLE.CHANNEL.SVRCONN

    • For clientConnection, (<mq_host_name>:<mq_port>) corresponds to the network address (<mq_host_name>) with port (<mq_port>) of the Websphere MQ server to connect to, for example: examplehost:1414 or

  • variant should take the queue or topic value to connect to a queue or a topic respectively.

  • jndiURL needs to be set to a non-empty value. The recommendation is wmq://queue for queue connections and wmq://topic for topic connections.

Below is an example of connection to a Webpshere MQ queue called test.queue with broker running on localhost port 1414. The channel EXAMPLE.CHANNEL.SVRCONN and the queue manager QMGR will be used to connect to the queue.

Websphere MQ connection to queue URI


When connecting to a topic, an additional JMS URI parameter is required: jndi-destination-type=topic. Starting with the version 6.1.1 of Talend ESB, this parameter is optional if jndiURL=wmq://topic.

Below is an example showing connection to the topic test.topic to the same broker using the same channel and queue manager QMGR:

Websphere MQ topic connection URI


Wrapping IBM MQ client library JARs into an OSGI bundle

This section describes how to wrap IBM WMQ client library jars into an OSGi bundle that can be used to create client connections to WMQ in an OSGi environment.


The following WMQ JARs (version 7.5) should be installed into the local maven repository:

  • CL3Export.jar

  • CL3Nonexport.jar

  • com.ibm.mq.commonservices.jar

  • com.ibm.mq.headers.jar

  • com.ibm.mq.jmqi.jar

  • com.ibm.mq.jms.Nojndi.jar

  • com.ibm.mq.pcf.jar

  • com.ibm.mqjms.jar

  • dhbcore.jar rmm.jar

To install JAR files into local repository, run the following commands from the directory that contains the JARs:

mvn install:install-file -Dfile=dhbcore.jar -DgroupId=com.ibm -DartifactId=com.ibm.disthub2.dhbcore -Dversion=7.5 -Dpackaging=jar
mvn install:install-file -Dfile=com.ibm.mq.jms.Nojndi.jar -DgroupId=com.ibm -DartifactId=com.ibm.mq.jms.Nojndi -Dversion=7.5 -Dpackaging=jar
mvn install:install-file -Dfile=com.ibm.mq.jmqi.jar -DgroupId=com.ibm -DartifactId=com.ibm.mq.jmqi -Dversion=7.5 -Dpackaging=jar
mvn install:install-file -Dfile=com.ibm.mqjms.jar -DgroupId=com.ibm -DartifactId=com.ibm.mqjms -Dversion=7.5 -Dpackaging=jar
mvn install:install-file -Dfile=CL3Export.jar -DgroupId=com.ibm -DartifactId=cl3export -Dversion=7.5 -Dpackaging=jar
mvn install:install-file -Dfile=CL3Nonexport.jar -DgroupId=com.ibm -DartifactId=cl3nonexport -Dversion=7.5 -Dpackaging=jar
mvn install:install-file -Dfile=com.ibm.mq.commonservices.jar -DgroupId=com.ibm -DartifactId=com.ibm.mq.commonservices -Dversion=7.5 -Dpackaging=jar
mvn install:install-file -Dfile=rmm.jar -DgroupId=com.ibm -DartifactId=rmm -Dversion=7.5 -Dpackaging=jar
mvn install:install-file -Dfile=com.ibm.mq.headers.jar -DgroupId=com.ibm -DartifactId=com.ibm.mq.headers -Dversion=7.5 -Dpackaging=jar
mvn install:install-file -Dfile=com.ibm.mq.pcf.jar -DgroupId=com.ibm -DartifactId=com.ibm.mq.pcf -Dversion=7.5 -Dpackaging=jar
  1. Add the file pom.xml containing the following content into an empty directory:

    <project xmlns="http://maven.apache.org/POM/4.0.0"
     <name>Websphere MQ client libraries OSGi Bundle</name>
     <description>This OSGi bundle simply wraps several WMQ artifacts into one.</description>
    com.ibm.disthub2.impl.util.*;resolution:=optional, com.ibm.ejs.*;resolution:=optional,
    com.ibm.misc;resolution:=optional, com.ibm.mq.internal;resolution:=optional,
    com.ibm.crypto.provider;resolution:=optional, com.ibm.security.*;resolution:=optional,
    sun.net.www;resolution:=optional, sun.security.*;resolution:=optional, *
  2. Go to the directory that contains the pom.xml and create a subdirectory src/main/resources/META-INF.

  3. Place the file compinfo.properties containing the following content to the directory src/main/resources/META-INF:

    CompList: comp1,comp2,comp3,comp4
    comp3_CompClass: com.ibm.msg.client.jms.internal.JMSComponent
    comp4_CompClass: com.ibm.mq.jms.MQJMSComponent
  4. Go to the directory that contains the pom.xml file and use the following command:

    mvn clean install

    During Maven build on Linux, a RuntimeException may occur with the message: " data starting at XX is in unknown format". This Exception is harmless and does not affect the build result.

  5. The bundle file wsmq-7.5.jar will appear in the subdirectory target/. This bundle can be used for deployment into OSGi.

  6. To deploy the bundle, copy the wsmq-7.5.jar file to the directory <TESB-HOME>/container/deploy.