Configure JMS Endpoint for ActiveMQ in Anypoint Studio

JMS Endpoint in Mule ESB makes us easy to send or receive messages from Queues, Topics of the libraries that implement the JMS specifications. In this tutorial, we will learn how to configure JMS Endpoint for ActiveMQ in Anypoint Studio.

Suppose, you have dragged JMS Endpoint into the Anypoint Studio Editor.

We can drop JMS Endpoint into the Editor’s Source section:

Configure JMS Endpoint for ActiveMQ in Anypoint Studio

At this moment, our JMS Endpoint plays the role of receiving messages from Topic or Queue.

If it is in the Process section:

Configure JMS Endpoint for ActiveMQ in Anypoint Studio

It is responsible for sending the message to the Topic or Queue of the ActiveMQ server.

At the bottom of the Editor, you will see the configuration tab for JMS Endpoint.

Configure JMS Endpoint for ActiveMQ in Anypoint Studio

Here, we have three parts that need to be configured for JMS Transport: the Topic or Queue name that our Mule ESB application will send or receive messages, the ActiveMQ server, and the way we will send or receive messages(one way or having a request and response).

– First, to configure the ActiveMQ server, in the Connector Configuration section of the Basic Settings, let click the Add button, the following window will appear:

Configure JMS Endpoint for ActiveMQ in Anypoint Studio

Here, we will select Active MQ and click the OK button.

Configure JMS Endpoint for ActiveMQ in Anypoint Studio

If you do not modify any configurations in ActiveMQ then you can set all the values in this window by default and click OK.

Here, I do not edit anything so I will let them as default.

At this time, configuration tab for JMS Endpoint will have the following content:

Configure JMS Endpoint for ActiveMQ in Anypoint Studio

– Next, we will configure the Topic or Queue name of the ActiveMQ server. If you choose to send or receive from a Topic, then click on Topic and then enter the name of the Topic which you want, and the same with Queue.

For example, I chose Topic as “test” and configured as follows:

Configure JMS Endpoint for ActiveMQ in Anypoint Studio

– To choose how to send or receive messages in one way or with a request response, in the Basic Settings section, you select “one-way” or “request-response” in the Exchange Pattern.

Here, I will set default to “one-way”.

Press Ctrl + S to save this configuration!


Đánh giá bài viết
Chia sẽ bài viết này ...Share on Facebook
Facebook
0Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin

Add Comment