In this tutorial we will talk about how to use JMS connector with Apache ActiveMQ with various use cases and scenarios. Anypoint Connector for JMS (Java Message Service) (JMS Connector) enables sending and receiving messages to queues and topics for any message service that implements the JMS specification. JMS is a widely used API for message-oriented middleware. It enables the communication between different components of a distributed application to be loosely coupled, reliable, and asynchronous. The main features of JMS Connector include:
We would need to download apache ActiveMQ from http://activemq.apache.org/download.html
ActiveMQ Set Up
Unzip the archive downloaded. You should be able to see following.
Run the command D:\Application\apache-activemq-5.15.2\bin>activemq start to start the ActiveMQ.
Open http://localhost:8161/admin/ and you should be able to see page below. use “admin“ as username and password.
Integration with MuleSoft
Perform the steps below for ActiveMQ connection configuration
Dependency below would be added in POM.
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client</artifactId>
<version>5.14.5</version>
</dependency>
You would also need to add the dependency for ActiveMQ broker (for non persistent in memory connection) or ActiveMQ Kaha DB (for persistent connection). Click on configure Broker dependency.
Dependency below would be added in POM.
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-broker</artifactId>
<version>5.15.4</version>
</dependency>
You can use JMS in your application to Send a message to queue or a topic using “Publish” JMS message processor.
Note: Also read about C Program – Structure & Keywords in C.
If you like my post please follow me to read my latest post on programming and technology.
https://www.instagram.com/coderz.py/
https://www.facebook.com/coderz.py
You are given a stream of elements that is too large to fit into memory.…
The formula for the area of a circle is given by πr². Use the Monte…
Given an integer k and a string s, write a function to determine the length…
There is a staircase with N steps, and you can ascend either 1 step or…
Build an autocomplete system that, given a query string s and a set of possible…
Design a job scheduler that accepts a function f and an integer n. The scheduler…