DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Designing a Java Connector for Software Integrations
  • Kafka JDBC Source Connector for Large Data
  • Make Your Integration Seamless By Using Ballerina Client Connectors
  • How to Integrate a Distributed Database With Event Streaming

Trending

  • Monoliths, REST, and Spring Boot Sidecars: A Real Modernization Playbook
  • Creating a Web Project: Caching for Performance Optimization
  • Analyzing Techniques to Provision Access via IDAM Models During Emergency and Disaster Response
  • How to Introduce a New API Quickly Using Micronaut

Integrating Mule and RabbitMQ

RabbitMQ can be deployed in distributed environments to meet high-scale, high-availability requirements.

By 
Muralidhar Gumma user avatar
Muralidhar Gumma
·
Jun. 27, 18 · Tutorial
Likes (1)
Comment
Save
Tweet
Share
16.4K Views

Join the DZone community and get the full member experience.

Join For Free

RabbitMQis one of the open source message brokers or queue manager software, which uses Advanced Message Queuing Protocol (AMQP). It implements a broker architecture, meaning that messages are queued on a central node called Exchange before being sent to clients. This approach makes RabbitMQ very easy to use and deploy. RabbitMQ can be deployed in distributed environments to meet high-scale, high-availability requirements.

The Message Flow in RabbitMQ

Image title

Objective

Integrating RabbitMQ with Mule and publishing an Employee Details onto a queue using RabbitMQ.

Prerequisites

  • Mule Anypoint Studio.
  • RabbitMQ server and server details.

To Integrate RabbitMQ with Mule, you need to have AMQP connector installed in Anypoint studio. So, first, download and install AMQP connector from the Anypoint exchange. Once the connector is installed, you can find all the endpoints and transformers related to AMQP in Mule Palette section.

Image title

Image provided by Cloudamq




Creating Mule Project to Publish Messages to RabbitMQ:

Once the project is created, configure HTTP endpoint in the source part of the flow. Once this is done, drag and drop AMQP connector onto the process part of the flow. 

Image title

Image title

Unlike other connectors, AMQP connector does not have connector configuration available in the connector to configure the connection details. So, we have to create a connection in global elements, and from there, the connector picks the connection details.

Configuring the AMQP Connector:

  • Go to global elements and select create the new global element.Image title

  • Search for AMQP and select AMQP Connector.Image title

  • Now go to protocol part and provide all the RabbitMQ server details like RabbitMQ host, port, Username, password, and other details. Once the configuration is done, proceed by selecting ok.Image title

  • Now go back to the flow canvas, select AMQP, and provide the queue name to which employee details need to be published.

Note: Unlike ActiveMQ it will not create a queue if it is not present. 
One should provide the name of the queue which is already present in the server queues. 

I have already created a queue (Employee) in the server, so I am just providing the name here.Image title

Once this done, deploy the application in the Anypoint studio. Once the application is deployed successfully, invoke the rest service. In my case, I am posting the employee details to the rest service.Image title

After invoking the service, go to RabbitMQ console and select the queue to which you have published the message. Image title

Here, you can find a list of the actions that can be performed on the queue. Expand Get messages.Image title

After expanding the Get messages action, configure the number of messages that need to be retrieved and other details, and then select Get Message(s).Image title

Now you can see the message that had been published and other JMS properties. Image title

Conclusion

You have seen how to configure the AMQP connector, publish the messaging to the RabbitMQ, and use the RabbitMQ console to see the messages in the queue.


Connector (mathematics)

Opinions expressed by DZone contributors are their own.

Related

  • Designing a Java Connector for Software Integrations
  • Kafka JDBC Source Connector for Large Data
  • Make Your Integration Seamless By Using Ballerina Client Connectors
  • How to Integrate a Distributed Database With Event Streaming

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!