cMQConnectionFactory
connection can be called by multiple cJMS,
cWMQ, cAMQP
or cMQTT components in a Route.
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.
cMQConnectionFactory Standard properties
These properties are used to configure cMQConnectionFactory running in the Standard Job framework.
The Standard
cMQConnectionFactory component belongs to the Connectivity/Messaging family.
Basic settings
MQ Server |
Select an MQ server from ActiveMQ, WebSphere MQ Jms, WebSphere MQ Native, AMQP The connection to the WebSphere MQ native server can also be configured in a For more information on connecting to WebSphere MQ, |
Use Transaction (for ActiveMQ, |
Select this check box to enable local transaction in the Route that consumes |
Broker URI (for ActiveMQ only) |
Type in the URI of the message broker. For intra-Route message handling, you can simply use the default URI |
HTTP Transport (for ActiveMQ |
Select this check box to enable the HTTP based connection to the ActiveMQ |
Use PooledConnectionFactory (for |
Select this check box to use PooledConnectionFactory. |
Max Connections (for ActiveMQ |
Specify the maximum number of connections of the PooledConnectionFactory. This |
Max Active (for ActiveMQ only) |
Specify the maximum number of sessions per connection. This field is available |
Idle Timeout (in ms) (for ActiveMQ |
Specify the maximum waiting time (in milliseconds) before the connection breaks. |
Expiry Timeout (in ms) (for ActiveMQ |
Specify the time (in milliseconds) before the connection breaks since it is used for the first time. The default value is 60000. The expiry is disabled if 0 is specified. This field is available only when the Use PooledConnectionFactory check box is selected. |
Host Name (for WebSphere MQ Jms, |
Type in the name or IP address of the host on which the IBM WebSphere MQ server or |
Port (for WebSphere MQ Jms, |
Type in the port of the MQ server. For WebSphere MQ Jms and |
Transport Type (for WebSphere MQ Jms |
Select a type of message transport between the IBM WebSphere MQ server and the |
Queue Manager (for WebSphere MQ Jms |
Type in the name of the queue manager, or specify the name of the IBM WebSphere MQ |
Channel (for WebSphere MQ Jms and |
Specify the name of the channel through which the connection is established. For |
Name (for WebSphere MQ Native |
Specify the name of the queue manager to which the connection is established. |
Authentication (for ActiveMQ, |
Select this check box and provide the username and password for the MQ server to |
Dependencies (for WebSphere MQ Jms, |
Specify additional libraries required by the MQ broker. |
Use SSL (for AMQP 1.0 and |
Select this check box to connect to the MQ server over the SSL protocol. For |
Connect Attempts (for MQTT only) |
The maximum number of attempts to establish an initial connection, |
Reconnect Attempts (for MQTT |
The maximum number of attempts to re-establish a connection after a failure, |
Reconnect Delay (for MQTT only) |
The time in milliseconds between attempts to re-establish an initial or failed |
Quality of Service (for MQTT |
The MQTT Quality of Service to use for message exchanges. It can be one of |
Connect Wait In Seconds (for MQTT |
Delay in seconds that the component will wait for a connection to be established |
Disconnect Wait In Seconds (for MQTT |
The number of seconds the component will wait for a valid disconnect from the MQTT |
Send Wait In Seconds (for MQTT |
The maximum time the component will wait for a receipt from the MQTT broker to |
Codes (for Customized only) |
Write a piece of code to specify the MQ connection factory to be used for message |
Usage
Usage rule |
cMQConnectionFactory cannot be |
Limitation |
Due to license incompatibility, one or more JARs required to use this component are not To use the WebSphere MQ Native |
Related scenario:
For a related scenario, see Scenario 1: Sending and receiving a message from a JMS queue.