What problem does it solve?
Provides a clear, production-oriented approach to implement event-driven architecture in Spring Boot so teams can decouple services, ensure transactional consistency for domain events, and reliably publish/consume messages across distributed systems.
Core Features & Use Cases
- Domain event design with immutable event objects and correlation IDs for traceability.
- Local event publishing using ApplicationEventPublisher and @TransactionalEventListener to guarantee AFTER_COMMIT semantics.
- Distributed messaging integration with Kafka and Spring Cloud Stream, including producer/consumer bindings and partitioning for ordering.
- Transactional outbox pattern and scheduled publishers for reliable delivery, idempotent handlers, retry/backoff, and dead-letter handling.
- Testing strategies with Testcontainers and unit/integration examples for validating event flows and Kafka interactions.
- Use cases: converting monolithic workflows to event-driven sagas, implementing asynchronous notifications, and building event sourcing foundations.
Quick Start
Create domain events, publish them from your transactional service using ApplicationEventPublisher, and configure a Kafka producer or outbox publisher to deliver events to other services.