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:
|
1 2 3 |
default.hostname=localhost default.port=7777 default.channel=QM_TEST.SVRCONN |
The mq.properties can contain multiple MQ Queue Managers definition. The
format is:
|
1 2 3 |
name.hostname name.port name.channel |
where the name is the queue manager name. For example, the
mq.properties file can contain:
|
1 2 3 4 5 6 |
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:
|
1 2 3 4 5 6 |
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.