{"id":22202346,"url":"https://github.com/imsma/spring-boot-rabbitmq","last_synced_at":"2026-05-08T13:45:00.659Z","repository":{"id":261771234,"uuid":"885280218","full_name":"imsma/spring-boot-rabbitmq","owner":"imsma","description":"This bySMA repository demonstrates the setup for message-driven apps with RabbitMQ and Spring Boot. It includes two sample applications: a Producer that sends messages and a Consumer that listens for and processes them. Configured for easy setup with Docker, this project provides a hands-on guide to implementing reliable, scalable message queuing.","archived":false,"fork":false,"pushed_at":"2024-11-09T00:51:00.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T03:26:33.023Z","etag":null,"topics":["amqp","microservices","rabbitmq","rabbitmq-consumer","rabbitmq-producer","spring","spring-boot"],"latest_commit_sha":null,"homepage":"https://sma.im","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imsma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-08T09:42:27.000Z","updated_at":"2024-11-23T15:52:26.000Z","dependencies_parsed_at":"2025-01-30T03:34:37.736Z","dependency_job_id":null,"html_url":"https://github.com/imsma/spring-boot-rabbitmq","commit_stats":null,"previous_names":["imsma/spring-boot-rabbitmq"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imsma%2Fspring-boot-rabbitmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imsma%2Fspring-boot-rabbitmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imsma%2Fspring-boot-rabbitmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imsma%2Fspring-boot-rabbitmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imsma","download_url":"https://codeload.github.com/imsma/spring-boot-rabbitmq/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245383118,"owners_count":20606265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amqp","microservices","rabbitmq","rabbitmq-consumer","rabbitmq-producer","spring","spring-boot"],"created_at":"2024-12-02T16:14:11.531Z","updated_at":"2026-05-08T13:44:55.609Z","avatar_url":"https://github.com/imsma.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot RabbitMQ Producer \u0026 Consumer Example bySMA\n\nWelcome to the **Spring Boot RabbitMQ** example repository bySMA! This project is a simple, hands-on guide to setting up message queues using RabbitMQ with Spring Boot. We’ll show you the ropes by building two Spring Boot applications – a **Producer** that sends messages and a **Consumer** that receives them. Whether you’re a beginner in messaging systems or looking to sharpen your skills, this project will get you up and running in no time.\n\n## Project Overview\n\nThis repository hosts two Spring Boot projects: the **Producer** and the **Consumer**. The Producer sends messages to RabbitMQ, while the Consumer listens for these messages and processes them. Here’s the breakdown:\n\n- **Producer App**: [View Code](https://github.com/imsma/spring-boot-rabbitmq/tree/main/producer)\n- **Consumer App**: [View Code](https://github.com/imsma/spring-boot-rabbitmq/tree/main/consumer)\n\nThe projects use **OpenJDK 21**, **Spring Boot 3.3.5**, and **Maven** for dependency management, giving you the latest and greatest to work with.\n\n## Tech Stack\n\n- **Java**: OpenJDK 21\n- **Spring Boot**: Version 3.3.5\n- **Maven**: For build and dependency management\n- **RabbitMQ**: Docker setup included for easy configuration\n\n## Setting Up RabbitMQ with Docker\n\nTo make it easy to run RabbitMQ on your local machine, we’ll use Docker. If you don’t have Docker installed, [install it from here](https://docs.docker.com/get-docker/).\n\nOnce Docker is ready, start a RabbitMQ container with the following command:\n\n```bash\ndocker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management\n```\n\nThis command does a few things:\n\n- Downloads the RabbitMQ image with a management plugin.\n- Exposes RabbitMQ on port **5672** (for messaging) and **15672** (for the management dashboard).\n\nOnce it’s running, you can access the RabbitMQ management console at `http://localhost:15672` using the default credentials:\n\n- **Username**: `guest`\n- **Password**: `guest`\n\n## Running the Spring Boot Applications\n\nFollow these steps to run the Producer and Consumer projects.\n\n1. **Clone the Repository**\n\n   Clone this repo to your machine using HTTPS or SSH:\n\n   ```bash\n   git clone https://github.com/imsma/spring-boot-rabbitmq.git\n   ```\n\n2. **Navigate to Each Project**\n\n   Change directories to either the `producer` or `consumer` folder, depending on which one you want to start first.\n\n   ```bash\n   cd spring-boot-rabbitmq/producer\n   # or\n   cd spring-boot-rabbitmq/consumer\n   ```\n\n3. **Build the Project with Maven**\n\n   Run the Maven command to build the project. This command compiles the code and packages it into a runnable `.jar` file:\n\n   ```bash\n   mvn clean install\n   ```\n\n4. **Run the Spring Boot Application**\n\n   After building, you can run the app with the following command:\n\n   ```bash\n   java -jar target/producer.jar  # For the Producer app\n   java -jar target/consumer.jar  # For the Consumer app\n   ```\n\n   Alternatively, if you’re using an IDE like IntelliJ or Eclipse, simply run the `main` class for each project to start the applications.\n\n### How It Works\n\n1. **Producer App**: This app connects to RabbitMQ and sends messages to a specified queue. You’ll see logs in the console as each message is sent.\n\n2. **Consumer App**: This app listens to the same RabbitMQ queue, receiving and processing each message as it arrives.\n\nThe setup is designed to be straightforward, so you can focus on understanding how RabbitMQ works with Spring Boot rather than getting bogged down in configuration details.\n\n## License\n\nThis project is licensed under the MIT License, which means you’re free to use, modify, and distribute it as you please.\n\n## About bySMA\n\nThis example is part of the open-source initiative bySMA, where I, Shoket Mahmood Ahmed (SMA), share code samples, tools, and practical resources for developers. If this project helps you, check out more of my work on GitHub and my blog.\n\n## Further Reading\n\nFor tips, tutorials, and insights, feel free to visit my blog at [sma.im](https://sma.im) – I'd love for you to explore and join the conversation!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimsma%2Fspring-boot-rabbitmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimsma%2Fspring-boot-rabbitmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimsma%2Fspring-boot-rabbitmq/lists"}