spring-boot-event-driven-patterns

仓库创建 2025年10月21日最近提交 1 个月前SkillHot 收录 22 天前
▸ 精选理由

覆盖可靠投递与事务边界,适合构建微服务事件流水线。

▸ 风险提示

依赖外部消息系统与运维配置,需配置 Kafka/事务后端权限

这个 Skill 做什么

在 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.

开发编程事件驱动Kafkaoutbox通用
311
Stars
37
Forks
40
仓库内 Skill
+10
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/giuseppe-trisciuoglio/developer-kit/main/plugins/developer-kit-java/skills/spring-boot-event-driven-patterns/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/giuseppe-trisciuoglio/developer-kit/main/plugins/developer-kit-java/skills/spring-boot-event-driven-patterns/SKILL.md"
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 
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有