Connecting to Apache Artemis¶
This section describes how to configure WSO2 Micro Integrator to connect with Apache Artemis (version 2.39.0).
Follow the instructions below to set up and configure.
- Download and setup Apache Artemis.
- Download and install WSO2 Micro Integrator.
-
If you want the Micro Integrator to receive messages from an Artemis instance, or to send messages to an Artemis instance, you need to update the deployment.toml file with the relevant connection parameters.
-
Add the following configurations to enable the JMS listener with ActiveMQ connection parameters.
[[transport.jms.listener]] name = "myTopicConnectionFactory" parameter.initial_naming_factory = "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory" parameter.provider_url = "tcp://localhost:61616" parameter.connection_factory_name = "TopicConnectionFactory" parameter.connection_factory_type = "topic" [[transport.jms.listener]] name = "myQueueConnectionFactory" parameter.initial_naming_factory = "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory" parameter.provider_url = "tcp://localhost:61616" parameter.connection_factory_name = "QueueConnectionFactory" parameter.connection_factory_type = "queue" [[transport.jms.listener]] name = "default" parameter.initial_naming_factory = "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory" parameter.provider_url = "tcp://localhost:61616" parameter.connection_factory_name = "QueueConnectionFactory" parameter.connection_factory_type = "queue"
-
Add the following configurations to enable the ActiveMQ JMS sender with ActiveMQ connection parameters.
[[transport.jms.sender]] name = "commonJmsSenderConnectionFactory" parameter.initial_naming_factory = "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory" parameter.provider_url = "tcp://localhost:61616" parameter.connection_factory_name = "QueueConnectionFactory" parameter.connection_factory_type = "queue" [[transport.jms.sender]] name = "commonTopicPublisherConnectionFactory" parameter.initial_naming_factory = "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory" parameter.provider_url = "tcp://localhost:61616" parameter.connection_factory_name = "TopicConnectionFactory" parameter.connection_factory_type = "topic"
Note
When using
JMSsender
, the address URI in the Synapse configuration should be in the following format.Example:jms:/<Queue_Name>?transport.jms.ConnectionFactory=<parameter_name_of_the_connection_factory>
<address uri="jms:/TestQueue?transport.jms.ConnectionFactory=commonJmsSenderConnectionFactory"/>
-
-
Remove any existing Apache ActiveMQ client JAR files from the
MI_HOME/dropins/
andMI_HOME/lib/
directories. -
Download the artemis-jms-client-all-2.39.0.jar file and copy it to the
<MI_HOME>/lib/
directory. -
Start Apache Artemis. For instructions, see the Apache Artemis Documentation.
- Start the Micro Integrator.
Now you have configured instances of Apache Artemis and WSO2 Micro Integrator.