August 15, 2023

cMQConnectionFactory – Docs for ESB 6.x

cMQConnectionFactory

Encapsulates a set of configuration parameters to connect to a MQ server. The
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:

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

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

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

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
1.0, MQTT, or Customized.

The connection to the WebSphere MQ native server can also be configured in a
properties file. For more information, see Configuring connection to the WebSphere MQ native server in a properties file.

For more information on connecting to WebSphere MQ,
see the online documentation on Talend Help Center (https://help.talend.com).

Use Transaction (for ActiveMQ,
WebSphere MQ Jms, and Customized
only)

Select this check box to enable local transaction in the Route that consumes
messages from the MQ server. If exception occurs in the Route, the message in
the message broker will be sent to the dead letter queue after the
maximumRedeliveries configured for the Redelivery Policy, and will not be
consumed by the Route. For more information, see the site http://camel.apache.org/transactional-client.html.

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
vm://localhost?broker.persistent=false for ActiveMQ.

HTTP Transport (for ActiveMQ
only)

Select this check box to enable the HTTP based connection to the ActiveMQ
broker.

Use PooledConnectionFactory (for
ActiveMQ only)

Select this check box to use PooledConnectionFactory.

Max Connections (for ActiveMQ
only)

Specify the maximum number of connections of the PooledConnectionFactory. This
field is available only when the Use
PooledConnectionFactory
check box is selected.

Max Active (for ActiveMQ only)

Specify the maximum number of sessions per connection. This field is available
only when the Use PooledConnectionFactory check box is
selected.

Idle Timeout (in ms) (for ActiveMQ
only)

Specify the maximum waiting time (in milliseconds) before the connection breaks.
This field is available only when the Use
PooledConnectionFactory
check box is selected.

Expiry Timeout (in ms) (for ActiveMQ
only)

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,
WebSphere MQ Native, AMQP 1.0 and
MQTT
only)

Type in the name or IP address of the host on which the IBM WebSphere MQ server or
the MQTT broker is running. For WebSphere MQ Jms,
WebSphere MQ Native and AMQP 1.0,
the default is localhost. For MQTT, the default is
127.0.0.1.

Port (for WebSphere MQ Jms,
WebSphere MQ Native, AMQP 1.0 and
MQTT only)

Type in the port of the MQ server. For WebSphere MQ Jms and
WebSphere MQ Native, the default is
1414. For AMQP 1.0, the default is
5672. For MQTT, the default is
1883.

Transport Type (for WebSphere MQ Jms
only)

Select a type of message transport between the IBM WebSphere MQ server and the
WebSphere MQ broker from Bindings, Bindings then
Client
, and Client.

Queue Manager (for WebSphere MQ Jms
only)

Type in the name of the queue manager, or specify the name of the IBM WebSphere MQ
server to find a queue manager.

Channel (for WebSphere MQ Jms and
WebSphere MQ Native only)

Specify the name of the channel through which the connection is established. For
WebSphere MQ Jms, the default is
SYSTEM.DEF.SVRCONN. For WebSphere MQ
Native
, the default is channel.name.

Name (for WebSphere MQ Native
only)

Specify the name of the queue manager to which the connection is established.

Authentication (for ActiveMQ,
WebSphere MQ Jms, WebSphere MQ
Native
, AMQP 1.0, and
MQTT only)

Select this check box and provide the username and password for the MQ server to
validate the access permission. To enter the password, click the
[…] button next to the password field, and then in the
pop-up dialog box enter the password between double quotes and click
OK to save the settings. For WebSphere MQ
Native
server, provide the CCSID (Coded Character Set Identifier)
in addition that defines a numeric ordering of characters. For more information
about CCSID, see the site http://www-01.ibm.com/software/globalization/cdra/appendix_c.html.

Dependencies (for WebSphere MQ Jms,
WebSphere MQ Native and
Customized only)

Specify additional libraries required by the MQ broker.

Use SSL (for AMQP 1.0 and
MQTT only)

Select this check box to connect to the MQ server over the SSL protocol. For
MQTT, specify the TrustStore file containing the list of
certificates that the MQ server trusts and enter the password used to check the
integrity of the TrustStore data.

Connect Attempts (for MQTT only)

The maximum number of attempts to establish an initial connection,
-1 by default to use unlimited attempts.

Reconnect Attempts (for MQTT
only)

The maximum number of attempts to re-establish a connection after a failure,
-1 by default to use unlimited attempts.

Reconnect Delay (for MQTT only)

The time in milliseconds between attempts to re-establish an initial or failed
connection, 10 by default.

Quality of Service (for MQTT
only)

The MQTT Quality of Service to use for message exchanges. It can be one of
AtMostOnce, AtLeastOnce or
ExactlyOnce.

Connect Wait In Seconds (for MQTT
only)

Delay in seconds that the component will wait for a connection to be established
to the MQTT broker, 10 by default.

Disconnect Wait In Seconds (for MQTT
only)

The number of seconds the component will wait for a valid disconnect from the MQTT
broker, 5 by default.

Send Wait In Seconds (for MQTT
only)

The maximum time the component will wait for a receipt from the MQTT broker to
acknowledge a published message before throwing an exception, 5
by default.

Codes (for Customized only)

Write a piece of code to specify the MQ connection factory to be used for message
handling.

Usage

Usage rule

cMQConnectionFactory cannot be
added directly in a Route.

Limitation

Due to license incompatibility, one or more JARs required to use this component are not
provided. You can install the missing JARs for this particular component by clicking the
Install button on the Component tab view. You can also find out and add all missing JARs easily on the
Modules tab in the
Integration
perspective of your
studio. You can find more details about how to install external modules in Talend Help Center (https://help.talend.com).

To use the WebSphere MQ Native
server, you need to download the
com.ibm.mq.jar,
com.ibm.mq.commonservices.jar,
com.ibm.mq.headers.jar,
com.ibm.mq.jmqi.jar and
connector.jar from the IBM web site and add
them to the Dependencies
list.

Related scenario:


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x