spring-boot-event-driven-patterns
覆盖可靠投递与事务边界,适合构建微服务事件流水线。
依赖外部消息系统与运维配置,需配置 Kafka/事务后端权限
在 Spring Boot 中实现事件驱动架构,包含 ApplicationEvent、Kafka 与事务性 outbox 模式。
帮你在 Spring Boot 里把业务变成事件流:发布 domain events、用 ApplicationEvent 和 @TransactionalEventListener 异步处理、接入 Kafka,并实现事务性 outbox 来保证分布式消息可靠投递。适合做事件驱动微服务、从 DDD 聚合根发事件或需要把本地事务和消息投递结合起来的场景。特别之处是把本地事务与异步消息用 outbox 模式解耦,能减少丢失或重复投递的问题。
▸ 展开 SKILL.md 英文原文
Provides Event-Driven Architecture (EDA) patterns for Spring Boot — creates domain events, configures ApplicationEvent and @TransactionalEventListener, sets up Kafka producers and consumers, and implements the transactional outbox pattern for reliable distributed messaging. Use when implementing event-driven systems in Spring Boot, setting up async messaging with Kafka, publishing domain events from DDD aggregates, or needing reliable event publishing with the outbox pattern.
帮我安装这个 skill:https://raw.githubusercontent.com/giuseppe-trisciuoglio/developer-kit/main/plugins/developer-kit-java/skills/spring-boot-event-driven-patterns/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/giuseppe-trisciuoglio/developer-kit/main/plugins/developer-kit-java/skills/spring-boot-event-driven-patterns/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