# cMQConnectionFactory

Encapsulates a set of configuration parameters to connect to a MQ server. The connection can be called by multiple cAMQP, cJMS, cMQTT, cRabbitMQ, or cWMQ components in a Route.

## cMQConnectionFactory Standard properties

These properties are used to configure cMQConnectionFactory running in the Standard Job framework.

The Standard cMQConnectionFactory component belongs to the Connectivity family.

## Basic settings

| Properties | Description |
| --- | --- |
| MQ Server | Select an MQ server from ActiveMQ,<br>RabbitMQ, WebSphere MQ Jms,<br>WebSphere MQ Native, AMQP 1.0,<br>MQTT, or Customized.<br><br>Information noteNote: The RabbitMQ option is available only when you have<br>installed the 8.0.1-R2025-02 Talend Studio Monthly update or a later one delivered by Talend. For more information, check with your administrator.<br><br>The connection to the WebSphere MQ native server can also be configured in a<br>properties file. For more information, see [Configuring connection to the WebSphere MQ native server in a properties file](https://help.qlik.com/talend/en-US/components/8.0/mediation-amqp/cmqconnectionfactory-cmqconnectionfactory-configuring-connection-to-websphere-mq-native-server-in-properties-file).<br><br>For more information on connecting to WebSphere MQ, see [Connecting to Websphere MQ](https://help.qlik.com/talend/r/en-US/8.0/esb-service-developer-guide/connecting-to-websphere-mq). |
| Use Transaction (for ActiveMQ,<br>WebSphere MQ Jms, and<br>Customized only) | Select this check box to enable local transaction in the Route that consumes<br>messages from the MQ server. If exception occurs in the Route, the message in<br>the message broker will be sent to the dead letter queue after the<br>maximumRedeliveries configured for the Redelivery Policy, and will not be<br>consumed by the Route. For more information, see the site http://camel.apache.org/transactional-client.html. |
| Broker URI (for ActiveMQ<br>only) | Type in the URI of the message broker.<br><br>For intra-Route message handling, you can simply use the default URI<br>vm://localhost?broker.persistent=false for<br>ActiveMQ.<br><br>Information noteWarning:<br><br>If you try to set the Broker URI parameter with<br>"{{activemq\_url}}", you may have the following<br>error<br>message:<br><br>```<br>Invalid broker URI: {{activemq_url}}<br>```<br><br>After<br>configuring a property component, you can use the Camel property syntax<br>{{...}} directly in most Talend components. However, there are a few exceptions. The<br>cMQConnectionFactory component is one of those<br>exceptions where you can not directly use the {{...}}<br>syntax.<br><br>Instead of using "{{activemq\_url}}", call the<br>Camel resolvePropertyPlaceholders method, as shown<br>below:<br><br>```<br>camelContext.resolvePropertyPlaceholders("{{activemq_url}}")<br>``` |
| HTTP Transport (for ActiveMQ<br>only) | Select this check box to enable the HTTP based connection to the ActiveMQ<br>broker. |
| Use PooledConnectionFactory (for<br>ActiveMQ only) | Select this check box to use PooledConnectionFactory. |
| Max Connections (for ActiveMQ<br>only) | Specify the maximum number of connections of the PooledConnectionFactory. This<br>field is available only when the Use<br>PooledConnectionFactory check box is selected. |
| Max Active (for ActiveMQ<br>only) | Specify the maximum number of sessions per connection. This field is available<br>only when the Use PooledConnectionFactory check box is<br>selected. |
| Idle Timeout (in ms) (for<br>ActiveMQ only) | Specify the maximum waiting time (in milliseconds) before the connection<br>breaks. This field is available only when the Use<br>PooledConnectionFactory check box is selected. |
| Expiry Timeout (in ms) (for<br>ActiveMQ only) | Specify the time (in milliseconds) before the connection breaks since it is<br>used for the first time. The default value is 60000. The expiry is disabled if 0<br>is specified. This field is available only when the Use<br>PooledConnectionFactory check box is selected. |
| Host Name (for RabbitMQ,<br>WebSphere MQ Jms, WebSphere MQ<br>Native, AMQP 1.0 and<br>MQTT only) | Type in the name or IP address of the host on which the IBM WebSphere MQ server<br>or the MQTT broker is running. For WebSphere MQ Jms,<br>WebSphere MQ Native and AMQP<br>1.0, the default is "localhost". For<br>MQTT, the default is<br>127.0.0.1.<br><br>For AMQP 1.0, the Host Name can<br>be set as either a standard single IP address or host name, or a failover URL,<br>for example "failover:(amqp://localhost:5672)". |
| Port (for RabbitMQ,<br>WebSphere MQ Jms, WebSphere MQ<br>Native, AMQP 1.0 and<br>MQTT only) | Type in the port of the MQ server.<br><br><ul> <li>For <span>WebSphere MQ Jms</span> and <span>WebSphere MQ                              Native</span>, the default is <kbd>1414</kbd>.</li> <li>For <span>AMQP 1.0</span>, the default is                              <kbd>5672</kbd>. The value of the port will be ignored if                           the <span>Host Name</span> is a failover URL.</li> <li>For <span>MQTT</span>, the default is                              <kbd>1883</kbd>.</li> </ul> |
| Virtual Host (for RabbitMQ<br>only) | Specify the virtual host to be used for publishing or receiving messages.<br><br>Information noteNote: This option is available only when you have installed the 8.0.1-R2025-02<br>Talend Studio Monthly update or a later one delivered by Talend. For more information, check with your administrator. |
| Transport Type (for WebSphere MQ<br>Jms only) | Select a type of message transport between the IBM WebSphere MQ server and the<br>WebSphere MQ broker from Bindings, Bindings<br>then Client, and Client. |
| Queue Manager (for WebSphere MQ<br>Jms only) | Type in the name of the queue manager, or specify the name of the IBM WebSphere<br>MQ server to find a queue manager. |
| Channel (for WebSphere MQ Jms and<br>WebSphere MQ Native only) | Specify the name of the channel through which the connection is established.<br>For WebSphere MQ Jms, the default is<br>SYSTEM.DEF.SVRCONN. For WebSphere MQ<br>Native, the default is channel.name. |
| Name (for WebSphere MQ Native<br>only) | Specify the name of the queue manager to which the connection is<br>established. |
| Use Authentication (for ActiveMQ,<br>WebSphere MQ Jms, WebSphere MQ<br>Native, AMQP 1.0, and<br>MQTT only) | Select this check box and provide the username and password for the MQ server<br>to validate the access permission. To enter the password, click the<br>[...] button next to the password field, and then in<br>the pop-up dialog box enter the password between double quotes and click<br>OK to save the settings. For WebSphere MQ<br>Native server, provide the CCSID (Coded Character Set<br>Identifier) in addition that defines a numeric ordering of characters. For more<br>information about CCSID, see the site http://www-01.ibm.com/software/globalization/cdra/appendix\_c.html. |
| Dependencies (for WebSphere MQ<br>Jms, WebSphere MQ Native and<br>Customized only) | Specify additional libraries required by the MQ broker. |
| Use SSL (for AMQP 1.0 and<br>MQTT only) | Select this check box to connect to the MQ server over the SSL protocol. For<br>MQTT, specify the TrustStore file containing the list<br>of certificates that the MQ server trusts and enter the password used to check<br>the integrity of the TrustStore data. |
| Auto Reconnect (for MQTT<br>only) | Select this check box to reconnect to the server if the connection is lost. |
| Connection timeout (for MQTT<br>only) | This maximum time interval in seconds that the the client will wait for the<br>network connection to the MQTT server to be established, 30 by default. |
| Max Reconnect Delay (for MQTT<br>only) | The maximum time in milliseconds between attempts to re-establish an initial or<br>failed connection, 128000 by default. |
| MQTT version (for MQTT only) | Select the MQTT version to connect with, 3.1.1 by default. |
| Quality of Service (for MQTT<br>only) | The MQTT Quality of Service to use for message exchanges. It can be one of<br>AtMostOnce, AtLeastOnce or<br>ExactlyOnce. |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | cMQConnectionFactory can be<br>added directly in a Route without any input or output component linked. |
| Limitation | Due to license incompatibility, one or more JARs required to use this component<br>are not provided. You can install the missing JARs for this particular component by<br>clicking the Install button on the Component tab view. You can also find out and add all missing<br>JARs easily on the Modules tab in the Integration perspective of Talend Studio. For<br>details, see [Installing external modules](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/installing-external-modules).<br><br>To use the WebSphere MQ<br>Native server, you need to download the<br>com.ibm.mq.jar,<br>com.ibm.mq.commonservices.jar,<br>com.ibm.mq.headers.jar,<br>com.ibm.mq.jmqi.jar and<br>connector.jar from the IBM website and add them to the<br>Dependencies list. |

**Related concepts**

* [Sending and receiving a message from a JMS queue](https://help.qlik.com/talend/en-US/mediation-components/8.0/mediation-amqp/cjms-cmqconnectionfactory-cfile-cprocessor-sending-and-receiving-message-from-jms-queue)
* [Sending and receiving a scheduled delivery of messages from a JMS Queue using Camel Quartz](https://help.qlik.com/talend/en-US/mediation-components/8.0/mediation-amqp/cmqconnectionfactory-cjms-csetbody-cmessagingendpoint-sending-and-receiving-scheduled-delivery-of-messages-from-jms-queue-using-camel-quartz)
* [Setting up a JMS local transaction](https://help.qlik.com/talend/en-US/mediation-components/8.0/mediation-amqp/cjms-cmqconnectionfactory-cprocessor-cconfig-setting-up-jms-local-transaction)