Connecting to ActiveMQ - 8.0

Talend ESB Service Developer Guide

Version
8.0
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Module
Talend ESB
Talend Runtime
Content
Design and Development
Installation and Upgrade
Last publication date
2023-11-06

For connection to ActiveMQ:

  • JMS_broker_URL for ActiveMQ has the following structure:

    tcp://<host>:<port>
  • connection_factory_class_name should be org.apache.activemq.jndi.ActiveMQInitialContextFactory.

  • connection_factory_name is usually ConnectionFactory.

  • variant should take the jndi or jndi-topic value to connect to a queue or a topic respectively. However, queue or topic work also for ActiveMQ.

In case of connection to a dynamic queue/topic, the destination name needs to be prefixed with dynamicQueues/ or dynamicTopics/ respectively.

Below is an example of connection to a ActiveMQ dynamic queue called "test.queue" with a broker running on the localhost port 61616:

ActiveMQ connection to queue URI

jms:jndi:dynamicQueues/test.queue?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&jnd
iConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61616

Below is an example of connection to the dynamic topic "test.topic" with the broker running on localhost port 61616:

ActiveMQ connection to a topic URI

jms:jndi-topic:dynamicTopics/test.topic?jndiInitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory&jnd
iConnectionFactoryName=ConnectionFactory&jndiURL=tcp://localhost:61616