Skip to content

bayrameker/rabbitmq-spring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Name: Advanced RabbitMQ Messaging

Overview

This project demonstrates an advanced implementation of RabbitMQ for asynchronous messaging in a Spring Boot application. Designed with scalability and efficiency in mind, it allows for robust message handling in distributed systems, ensuring reliable communication between microservices.

Key Features:

  • Asynchronous messaging with RabbitMQ
  • Integration with Spring Boot and JPA for database operations
  • Dynamic routing using topic exchanges
  • Serializable object messaging
  • Error handling and message requeueing strategies

Getting Started

Prerequisites

  • Java 17 or higher
  • Maven 3.9.5 or higher
  • RabbitMQ Server
  • Optional: Docker for containerization

Installation

  1. Clone the repository:
    git clone https://github.com/scriptchief/rabbitmq-spring.git
  2. Navigate to the project directory:
    cd rabbitmq-spring
  3. Build the project with Maven:
    mvn clean install

Running the Application

  1. Start the RabbitMQ server on your local machine or use a Docker container.
  2. Run the Spring Boot application:
    mvn spring-boot:run

Usage

The application exposes REST APIs to interact with the RabbitMQ server for CRUD operations on Product entities.

  • Create a Product: Send a POST request to /api/products with a product JSON.
  • Read Product Details: Send a GET request to /api/products/{id}.
  • Update a Product: Send a PUT request to /api/products/{id} with the updated product JSON.
  • Delete a Product: Send a DELETE request to /api/products/{id}.

Architecture

  • Producer Service: Handles incoming REST requests and sends messages to RabbitMQ.
  • Consumer Service: Listens to RabbitMQ messages and processes them (e.g., database operations).
  • RabbitMQ Configuration: Defines queues, exchanges, and bindings.

Future Enhancements

  • Implementing advanced RabbitMQ features like dead-letter exchanges, delayed messaging, and priority queues.
  • Adding containerization with Docker and orchestration with Kubernetes.
  • Integrating with a frontend framework for a full-stack application.

Contributing

Contributions to enhance this project are welcome. Please read CONTRIBUTING.md for guidelines on how to contribute.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Contact

About

rabbitmq project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages