From the technical center of excellence of Massil Technologies, our technology leader Srini makes it easy to understand the complex situations you come across in Mule ESB from the experience of Massil Technologies to have countered them in their experience of working on client projects in real time. This blog addresses how to integrate Apache ActiveMQ with Mule ESB. This blog is a part of series of blogs being authored and published by Massil Technologies for the benefit of the IT community globally.
What is ActiveMQ?
Apache ActiveMQ is the most reputed and powerful messaging and integration patterns server in opensource. The best part of ActiveMQ is that it is lightning fast, supports multiple languages, clients and protocols. It comes with easy to use Enterprise Integration Patterns and vast gamete of advanced features that completely supports JMS 1.1 and J2EE 1.4.
Key Features of ActiveMQ:
Integrating ActiveMQ in Mule ESB:
Run ActiveMQ in your system by downloading ActiveMQ from the following link
Download the package that is most suitable for your system. Extract the file and run batch file of ActiveMQ. It will be located in the bin folder of ActiveMQ.
To run the batch file use this command in your command prompt ” ActiveMQ start”. Then it will run on your system at port no: 8161
You will find your admin portal at “http://localhost:8161/admin”
When you log in to your admin panel, it will prompt you with a dialogue box where you need to enter the username and password details as “admin” and “admin” as the default username and password for ActiveMQ.
You will see that there are two channels available to send a message to JMS:
The above image is explained with an example. In this example, we are going to create a topic called “Test”.
In Mule ESB, AnyPoint Studio, we follow the following steps:
Step-1: Create a new project
Step-2: Add HTTP connector from Mule pallet and configure it.
Step-3: Add JMS connector. Configure it as shown below
Step-4: In this example to see the output we are adding a logger to the flow and writing a MEL expression #[payload]
Step-5: Run the Project
After successful running of the project go to the postman and send a message and hit send. Check the log for output.
Hope this article from Massil Technologies was useful for you. If you have any further queries on this topic, please reach out to email@example.com.