This project demonstrates how to integrate RabbitMQ with a Spring Boot application. It showcases basic message 📩 publishing and consuming functionalities using RabbitMQ.
- 📨 Message Producer – Sends messages to a RabbitMQ queue
- 📬 Message Consumer – Listens to messages from the queue
- ⚙️ Spring Boot Integration – Simplified setup with Spring Boot
- ☕ Java 11 or higher
- 🐰 RabbitMQ (local or cloud)
- 📦 Maven (for dependency management)
- 🧪 Install RabbitMQ – Follow the official docs
▶️ Start RabbitMQ Server – Run it using the appropriate command for your OS
In your pom.xml, include the following:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>- 🧹 Build the Project
mvn clean install▶️ Run the Application
mvn spring-boot:runUse Postman or curl to send messages:
curl --header "Content-Type: application/json" \
--request POST \
--data '{"message":"Hello, RabbitMQ!"}' \
http://localhost:8080/sendLicensed under the MIT License 📘
Happy coding! 💻✨
🔗 Visit the repo