A collection of Kafka-based projects for learning and studying Apache Kafka patterns, architecture, and best practices.
A Spring Boot application demonstrating Kafka usage for banking event processing:
- Payment event production and consumption
- Event-driven architecture
- Kafka topic management
- Docker Compose setup for local development
cd kafka-banking-events
docker-compose up
mvn spring-boot:runA Spring Boot application for learning end-to-end Kafka event publishing and consuming:
- REST API to create orders and trigger Kafka events
- Order event production and consumption patterns
- JSON serialization/deserialization with Spring Kafka
- Topic creation via Spring configuration
- Observing delivery metadata (partition and offset)
- Error handling and logging
cd kafka-order-notification
docker-compose up
./mvnw spring-boot:runCreate an order:
curl -X POST http://localhost:8080/orders \
-H 'Content-Type: application/json' \
-d '{"customerId":"CUST-1","productName":"PENCIL","amount":12.50}'An advanced Spring Boot application extending kafka-order-notification with database-level event processing:
- Database-level order persistence with JPA/Hibernate
- Idempotency checks to prevent duplicate order processing
- Event deduplication using processed event store
- Order notifications service for order status tracking
- Kafka consumer with automatic offset reset
- Error handling and transactional guarantees
- Docker Compose setup with database support
cd DB-level-kafka-order-notification
docker-compose up
./mvnw spring-boot:runCreate an order:
curl -X POST http://localhost:8080/orders \
-H 'Content-Type: application/json' \
-d '{"customerId":"CUST-1","productName":"PENCIL","amount":12.50}'Each project folder contains its own setup instructions and documentation.
- Apache Kafka
- Spring Boot
- Docker & Docker Compose
- Maven