spring-boot-event-driven-patterns

Installation
Summary

Event-Driven Architecture patterns for Spring Boot using domain events, transactional listeners, and Kafka messaging.

  • Covers domain event design, ApplicationEventPublisher integration, and @TransactionalEventListener configuration for local event handling with AFTER_COMMIT phase guarantees
  • Supports distributed messaging via Kafka and Spring Cloud Stream for inter-service communication with functional consumer beans
  • Implements the transactional outbox pattern for reliable event publishing and includes retry logic with dead-letter queue handling
  • Provides testing strategies using Testcontainers for Kafka integration and includes best practices for event naming, idempotent handlers, and correlation ID tracing
SKILL.md

Spring Boot Event-Driven Patterns

Overview

Implement Event-Driven Architecture (EDA) patterns in Spring Boot 3.x using domain events, ApplicationEventPublisher, @TransactionalEventListener, and distributed messaging with Kafka and Spring Cloud Stream.

When to Use

  • Implementing event-driven microservices with Kafka messaging
  • Publishing domain events from aggregate roots in DDD architectures
  • Setting up transactional event listeners that fire after database commits
  • Adding async messaging with producers and consumers via Spring Kafka
  • Ensuring reliable event delivery using the transactional outbox pattern
  • Replacing synchronous calls with event-based communication between services

Quick Reference

Concept Description
Related skills

More from giuseppe-trisciuoglio/developer-kit

Installs
900
GitHub Stars
246
First Seen
Feb 3, 2026