Skip to content

A RabbitMQ-based messaging system designed for asynchronous communication in financial transaction processing. It ensures component decoupling, enhancing scalability and reliability. Well-suited for event-driven architectures, message queues, and distributed systems managing high transaction volumes efficiently.

Notifications You must be signed in to change notification settings

jerry-felipe/Asynchronous-RabbitMQ-Solution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Asynchronous-RabbitMQ-Solution

A RabbitMQ-based messaging system designed for asynchronous communication in financial transaction processing. It ensures component decoupling, enhancing scalability and reliability. Well-suited for event-driven architectures, message queues, and distributed systems managing high transaction volumes efficiently.

Features

  • Asynchronous Messaging: Handles background tasks without blocking other services.
  • Message Queues: Efficient message distribution with RabbitMQ.
  • Event-Driven Architecture: Supports event-driven systems, improving responsiveness.
  • Scalable: Easily scales to handle high message volumes.
  • Fault Tolerance: Ensures message delivery even in the event of service failures.

Modules

  • Transaction Management: Module in charge of the logic of transfers, deposits, and withdrawals, ensuring idempotence and consistency through distributed transactions.
  • Message Processing: Module that publishes and consumes events in RabbitMQ, configuring DLQ for failed messages.
  • Security and Audit: Module that implements JWT for authentication and generates detailed financial audit reports.

Technologies Used

  • Backend Framework: Spring Boot (Java)
  • Message Broker: RabbitMQ
  • JMS (Java Message Service): JMS for RabbitMQ message handling
  • API Documentation: Swagger/OpenAPI
  • Dependencies: Spring AMQP, RabbitMQ Client Library

Set Up the Environment

  1. Install RabbitMQ:

  2. Set up RabbitMQ:

    • Ensure RabbitMQ is running on the local or remote server:
      sudo systemctl start rabbitmq-server
  3. Configure Environment Variables:

    • Create a .env file or set environment variables for RabbitMQ connection:
      RABBITMQ_HOST=localhost
      RABBITMQ_PORT=5672
      RABBITMQ_USERNAME=your_username
      RABBITMQ_PASSWORD=your_password
  4. Add Dependencies to pom.xml:
    Add the following dependencies to your pom.xml to integrate RabbitMQ with Spring Boot:

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-amqp</artifactId>
    </dependency>
    <dependency>
        <groupId>com.rabbitmq</groupId>
        <artifactId>amqp-client</artifactId>
        <version>5.9.0</version>
    </dependency>
  5. Run the Application:

    • To start the Spring Boot application:
      mvn spring-boot:run

Usage

  • Start the API server using Spring Boot:
    mvn spring-boot:run
  • Access the API documentation at:
    http://localhost:8080/swagger-ui.html
    

Endpoints

Endpoint Method Description
/message/send POST Send a message to the queue.
/message/receive GET Receive messages from the queue.
/message/status/{messageId} GET Get the status of a message.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request with detailed notes.

License

This project is licensed under the MIT License.


For more information, contact jerry.felipe@gmail.com.

About

A RabbitMQ-based messaging system designed for asynchronous communication in financial transaction processing. It ensures component decoupling, enhancing scalability and reliability. Well-suited for event-driven architectures, message queues, and distributed systems managing high transaction volumes efficiently.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published