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.
- 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.
- 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.
- 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
-
Install RabbitMQ:
- Follow the installation guide from RabbitMQ official site.
-
Set up RabbitMQ:
- Ensure RabbitMQ is running on the local or remote server:
sudo systemctl start rabbitmq-server
- Ensure RabbitMQ is running on the local or remote server:
-
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
- Create a
-
Add Dependencies to
pom.xml
:
Add the following dependencies to yourpom.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>
-
Run the Application:
- To start the Spring Boot application:
mvn spring-boot:run
- To start the Spring Boot application:
- Start the API server using Spring Boot:
mvn spring-boot:run
- Access the API documentation at:
http://localhost:8080/swagger-ui.html
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. |
Contributions are welcome! Please fork the repository and submit a pull request with detailed notes.
This project is licensed under the MIT License.
For more information, contact jerry.felipe@gmail.com.