Connecting to Websphere MQ - 6.3

Talend ESB Service Developer Guide

EnrichVersion
6.3
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Design and Development
Installation and Upgrade
EnrichPlatform
Talend ESB

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:

    <hostname>:<port>
  • 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:

    connectQueueManager(<queue_manager>)binding(client)clientChannel(<channel_name>)cl
    ientConnection(<mq_host_name>:<mq_port>)

    Where:

    • 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 10.1.2.3:1414.

  • 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

jms:queue:test.queue?jndiInitialContextFactory=org.talend.esb.jms.wmq.Nojndi&jndiConnectionFactoryName=co
nnectQueueManager(QMGR)binding(client)clientChannel(EXAMPE.CHANNEL.SVRCONN)clientCon
nection(localhost:1414)&jndiURL=wmq://queue

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

jms:topic:test.topic?jndiInitialContextFactory=org.talend.esb.jms.wmq.Nojndi&jndiConnectionFactoryName=co
nnectQueueManager(QMGR)binding(client)clientChannel(EXAMPE.CHANNEL.SVRCONN)clientCon
nection(localhost:1414)&jndiURL=wmq://topic&jndi-destination-type=topic