A production-grade distributed task processing system built using Spring Boot, RabbitMQ, and MySQL.
This project showcases event-driven microservices architecture, focusing on asynchronous processing, fault tolerance, scalability, and reliable message delivery using industry-standard design patterns.
- Handles client task submissions
- Persists tasks in MySQL
- Implements Outbox Pattern for reliable event publishing
- Consumes messages from RabbitMQ
- Executes tasks asynchronously
- Handles retries, failures, and logging
- Decouples services via asynchronous messaging
- Supports:
- Task Queue
- Retry Queue (TTL-based delay)
- Dead Letter Queue (DLQ)
Client → API → DB → Outbox → RabbitMQ → Worker → DB
↓
Retry Queue
↓
DLQ
- Asynchronous task processing using RabbitMQ
- Microservices-based architecture
- Reliable event publishing via Outbox Pattern
- Configurable retry mechanism
- Delayed retries using TTL queues
- Dead Letter Queue (DLQ) for failed processing
- Idempotent processing using DB-level safeguards
- Create and manage tasks
- Retrieve task by ID
- Pagination support
- Filter tasks by status
- Centralized exception handling
- Request validation
- Structured API error responses
POST /tasks
{
"title": "Process Order",
"description": "Order ID 123"
}{
"id": 1,
"status": "PENDING"
}| Feature | Endpoint |
|---|---|
| Create Task | POST /tasks |
| Get Task by ID | GET /tasks/{id} |
| Get All Tasks | GET /tasks |
| Pagination | GET /tasks/paged?page=0&size=10 |
| Filter by Status | GET /tasks/status/{status} |
| Filter + Pagination | GET /tasks/status/paged?status=FAILED&page=0&size=10 |
PENDING → PROCESSING → COMPLETED
↓
FAILED → RETRY → DLQ
api-service/
└── Handles task submission and persistence
worker-service/
└── Processes tasks asynchronously
docs/
└── Contains architecture diagrams
postman/
└── API collections (optional)
- Used RabbitMQ for decoupled asynchronous communication
- Implemented Outbox Pattern to ensure consistency between DB and messaging
- Used DLQ for handling failed messages safely
- Applied idempotency to prevent duplicate processing
- Designed system for horizontal scalability
- Language: Java 21
- Backend: Spring Boot
- Database: MySQL
- Messaging: RabbitMQ
- ORM: Spring Data JPA
- Build Tool: Gradle
- Java 21+
- MySQL
- RabbitMQ
# Start API Service
cd api-service
./gradlew bootRun
# Start Worker Service
cd worker-service
./gradlew bootRun- Distributed Systems Design
- Event-Driven Architecture
- Outbox Pattern
- Retry & Failure Handling
- Dead Letter Queue (DLQ)
- Idempotent Processing
- Pagination & Filtering
- Exception Handling
- Docker & Containerization
- API Gateway Integration
- JWT Authentication & Security
- Monitoring (Prometheus, Grafana)
- Database Migration (Flyway)
This project reflects real-world backend engineering practices:
- Handles high-scale asynchronous workloads
- Ensures data consistency & reliability
- Demonstrates microservices communication patterns
- Designed with production-grade architecture principles
Pushpak A. Fasate
