Languages
[Edit]
EN

Spring Boot 2 - RabbitMQ simple example (producer + consumer)

3 points
Created by:
Creg
9600

In this article, we would like to show you how to create a simple project that uses RabbitMQ to transfer messages from one application to another using Spring Boot 2.

Definitions:

  • producer - the logic that sends messages
  • consumer - the logic that receives messages

Requirements

Edit

 

Spring Boot 2 Applications

Edit

Producer application example

Edit

Project structure:

 

DemoApplication.java file:

 

ProducerConfig.java file:

 

ProducerController.java file:

 

ProducerService.java file:

 

application.properties file:

 

Consumer application example

Edit

Project structure:

 

DemoApplication.java file:

 

ConsumerConfig.java file:

 

ConsumerService.java file:

 

application.properties file:

 

Common files

Edit

pom.xml file:

 

See also

Edit
  1. RabbitMQ - manage service installed under Windows via web browser

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join