Skip to main content

Configuring connection to the WebSphere MQ native server in a properties file

The connection to the WebSphere MQ native server can also be configured in a properties file. If the Hostname, Port, and Channel is not specified in the component fields, the component loads a mq.properties file from the classloader. An example of a mq.properties shown as follows:

default.hostname=localhost
default.port=7777
default.channel=QM_TEST.SVRCONN

The mq.properties can contain multiple MQ Queue Managers definition. The format is:

name.hostname
name.port
name.channel

where the name is the queue manager name. For example, the mq.properties file can contain:

default.hostname=localhost
default.port=7777
default.channel=DEFAULT.SVRCONN
test.hostname=localhost
test.port=7778
test.channel=QM_TEST.SVRCONN

The mq.properties also supports the optional userID, password, and CCSID properties, which are required only for authentication. For example:

default.hostname=localhost
default.port=7777
default.channel=DEFAULT.SVRCONN 
default.userID=mqm
default.password=mqm
default.CCSID=1208

To call the mq.properties, add it to the Dependencies table.

If the Route with this component is deployed in Runtime, the component calls the mq.properties file from <TalendRuntimePath>/container/etc folder.

For more information about how to specify the connection to the WebSphere MQ native server in the component fields, see cMQConnectionFactory.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!