Agent skill

Spring Boot Event Driven Patterns

by giuseppe-trisciuoglio in giuseppe-trisciuoglio/developer-kit

Provides Event-Driven Architecture (EDA) patterns for Spring Boot — creates domain events, configures ApplicationEvent and @TransactionalEventListener, sets up Kafka producers and consumers, and…

MITAuto-check: notesBackend & APIs

Install Spring Boot Event Driven Patterns

skills CLI
$ npx skills add giuseppe-trisciuoglio/developer-kit --skill spring-boot-event-driven-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install giuseppe-trisciuoglio/developer-kit spring-boot-event-driven-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/giuseppe-trisciuoglio/developer-kit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/developer-kit-java/skills/spring-boot-event-driven-patterns .claude/skills/spring-boot-event-driven-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
spring-boot-event-driven-patterns
GitHub stars
356
Token cost
~2.3k tokens
SKILL.md length
589 words
Files
11 (incl. references)
Skills in repo
115
Repo updated
First seen
Licence
MIT

At a glance

Provides Event-Driven Architecture (EDA) patterns for Spring Boot — creates domain events, configures ApplicationEvent and @TransactionalEventListener, sets up Kafka producers and consumers, and…

  • Works in 7 steps: Design Domain Events → Publish Events from Aggregates → Handle Events Transactionally → …
  • Implementing event-driven systems in Spring Boot
  • SKILL.md covers Overview, When to Use, Quick Reference and Examples, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Spring Boot Event Driven Patterns is an agent skill from giuseppe-trisciuoglio/developer-kit. 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.

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including reference files (for example `references/aggregate-root-patterns.md`, `references/configuration.md` and `references/dependency-setup.md`).

It sits in Backend & APIs, covering Event-driven systems and Backend development. It works with Spring Boot and Apache Kafka. The repository describes itself as: Modular plugin marketplace for Claude Code and agentic CLIs, with validated, spec-driven skills, agents, commands, and workflows for Java, TypeScript, Python, PHP, AWS, and AI. The licence is MIT.

When your agent uses it

  • Implementing event-driven systems in Spring Boot
  • Setting up async messaging with Kafka
  • Publishing domain events from DDD aggregates
  • Needing reliable event publishing with the outbox pattern

Example prompts

  • “Use the spring-boot-event-driven-patterns skill to provide Event-Driven Architecture (EDA) patterns for Spring Boot — creates domain events…”
  • “/spring-boot-event-driven-patterns”

Requirements

  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Design Domain Events
  2. Publish Events from Aggregates
  3. Handle Events Transactionally
  4. Configure Kafka Infrastructure
  5. Implement Outbox Pattern
  6. Handle Failure Scenarios
  7. Add Observability

What it can do on your machine

Read from SKILL.md and the folder at commit fe73fb3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are java and yaml).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Spring Boot Event Driven Patterns loads about 2.3k tokens when it runs, and up to ~25k if it reads all its reference files. Until then it costs about 129 tokens; SKILL.md has 589 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~129
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~25k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Edit, Bash

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from giuseppe-trisciuoglio/developer-kit at commit fe73fb3, republished under its MIT licence (© giuseppe-trisciuoglio). 589 words, ~2,304 tokens.

Download SKILL.mdSave it as .claude/skills/spring-boot-event-driven-patterns/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
spring-boot-event-driven-patterns
description
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.
allowed-tools
Read, Write, Edit, Bash

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

ConceptDescription
Domain EventsImmutable events extending DomainEvent base class with eventId, occurredAt, correlationId
Event PublishingApplicationEventPublisher.publishEvent() for local, KafkaTemplate for distributed
Event Listening@TransactionalEventListener(phase = AFTER_COMMIT) for reliable handling
Kafka@KafkaListener(topics = "...") for distributed event consumption
Spring Cloud StreamFunctional programming model with Consumer beans
Outbox PatternAtomic event storage with business data, scheduled publisher

Examples

Monolithic to Event-Driven Refactoring

Before (Anti-Pattern):

java
@Transactional
public Order processOrder(OrderRequest request) {
    Order order = orderRepository.save(request);
    inventoryService.reserve(order.getItems()); // Blocking
    paymentService.charge(order.getPayment()); // Blocking
    emailService.sendConfirmation(order); // Blocking
    return order;
}

After (Event-Driven):

java
@Transactional
public Order processOrder(OrderRequest request) {
    Order order = Order.create(request);
    orderRepository.save(order);

    // Publish event after transaction commits
    eventPublisher.publishEvent(new OrderCreatedEvent(order.getId(), order.getItems()));

    return order;
}

@Component
public class OrderEventHandler {
    @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
    public void handleOrderCreated(OrderCreatedEvent event) {
        // Execute asynchronously after the order is saved
        inventoryService.reserve(event.getItems());
        paymentService.charge(event.getPayment());
    }
}

See examples.md for complete working examples.

Instructions

1. Design Domain Events

Create immutable event classes extending a base DomainEvent class:

java
public abstract class DomainEvent {
    private final UUID eventId;
    private final LocalDateTime occurredAt;
    private final UUID correlationId;
}

public class ProductCreatedEvent extends DomainEvent {
    private final ProductId productId;
    private final String name;
    private final BigDecimal price;
}

See domain-events-design.md for patterns.

2. Publish Events from Aggregates

Add domain events to aggregate roots, publish via ApplicationEventPublisher:

java
@Service
@Transactional
public class ProductService {
    public Product createProduct(CreateProductRequest request) {
        Product product = Product.create(request.getName(), request.getPrice(), request.getStock());
        repository.save(product);

        product.getDomainEvents().forEach(eventPublisher::publishEvent);
        product.clearDomainEvents();

        return product;
    }
}

See aggregate-root-patterns.md for DDD patterns.

3. Handle Events Transactionally

Use @TransactionalEventListener for reliable event handling:

java
@Component
public class ProductEventHandler {
    @TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
    public void onProductCreated(ProductCreatedEvent event) {
        notificationService.sendProductCreatedNotification(event.getName());
    }
}

Validate: Confirm the event handler fires only after the transaction commits by checking that the database state is committed before the handler executes.

See event-handling.md for handling patterns.

4. Configure Kafka Infrastructure

Configure KafkaTemplate for publishing, @KafkaListener for consuming:

yaml
spring:
  kafka:
    bootstrap-servers: localhost:9092
    producer:
      value-serializer: org.springframework.kafka.support.serializer.JsonSerializer

Validate: Send a test event via KafkaTemplate and confirm it appears in the consumer logs before proceeding to production patterns.

See dependency-setup.md and configuration.md.

5. Implement Outbox Pattern

Create OutboxEvent entity for atomic event storage:

java
@Entity
public class OutboxEvent {
    private UUID id;
    private String aggregateId;
    private String eventType;
    private String payload;
    private LocalDateTime publishedAt;
}

Validate: Confirm the scheduled processor picks up pending events by checking the publishedAt timestamp is set after the scheduled run.

Scheduled processor publishes pending events. See outbox-pattern.md.

6. Handle Failure Scenarios

Implement retry logic, dead-letter queues, idempotent handlers:

java
@RetryableTopic(attempts = "3")
@KafkaListener(topics = "product-events")
public void handleProductEvent(ProductCreatedEventDto event) {
    orderService.onProductCreated(event);
}

Validate: Confirm messages reach the dead-letter topic after exhausting retries before moving to observability.

7. Add Observability

Enable Spring Cloud Sleuth for distributed tracing, monitor metrics.

Show full SKILL.md (250 more words)Show less

Best Practices

  • Use past tense naming: ProductCreated (not CreateProduct)
  • Keep events immutable: All fields should be final
  • Include correlation IDs: For tracing events across services
  • Use AFTER_COMMIT phase: Ensures events are published after successful database transaction
  • Implement idempotent handlers: Handle duplicate events gracefully
  • Add retry mechanisms: For failed event processing with exponential backoff
  • Implement dead-letter queues: For events that fail processing after retries
  • Log all failures: Include sufficient context for debugging
  • Make handlers order-independent: Event ordering is not guaranteed in distributed systems
  • Batch event processing: When handling high volumes
  • Monitor event latencies: Set up alerts for slow processing

References

Constraints and Warnings

  • Events published with @TransactionalEventListener only fire after transaction commit
  • Avoid publishing large objects in events (memory pressure, serialization issues)
  • Be cautious with async event handlers (separate threads, concurrency issues)
  • Kafka consumers must handle duplicate messages (implement idempotent processing)
  • Event ordering is not guaranteed in distributed systems (design handlers to be order-independent)
  • Never perform blocking operations in event listeners on the main transaction thread
  • Monitor for event processing backlogs (indicate system capacity issues)
  • spring-boot-security-jwt — JWT authentication for secure event publishing
  • spring-boot-test-patterns — Testing event-driven applications
  • aws-sdk-java-v2-lambda — Event-driven processing with AWS Lambda
  • langchain4j-tool-function-calling-patterns — AI-driven event processing

© giuseppe-trisciuoglio, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 10 other files (references) in plugins/developer-kit-java/skills/spring-boot-event-driven-patterns of giuseppe-trisciuoglio/developer-kit.

  • SKILL.md
  • references/aggregate-root-patterns.md
  • references/configuration.md
  • references/dependency-setup.md
  • references/domain-events-design.md
  • references/event-driven-patterns-reference.md
  • references/event-handling.md
  • references/event-publishing.md
  • references/examples.md
  • references/outbox-pattern.md
  • references/testing-strategies.md

Open the folder on GitHubat commit fe73fb3

Compare with similar skills

Spring Boot Event Driven Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Spring Boot Event Driven Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Spring Boot Event Driven Patterns this skillgiuseppe-trisciuoglio/developer-kit356—~2.3kAutomated safety check: NotesMIT
Event Driven Messagingrrezartprebreza/spring-boot-skills298—~556Automated safety check: PassMIT
Event Driven Messagingrrezartprebreza/spring-boot-skills298—~657Automated safety check: PassMIT
Kafka ConfigurationAmplicode/spring-skills126—~4kAutomated safety check: PassNone
314 Frameworks Spring Kafkajabrena/plinth447—~561Automated safety check: PassApache-2.0
323 Frameworks Spring Boot Testing Acceptance Testsjabrena/plinth447—~1.2kAutomated safety check: PassApache-2.0

Similar skills

  • Event Driven Messaging

    rrezartprebreza/spring-boot-skills

    A skill your agent uses when implementing Kafka, RabbitMQ, Pulsar, or JMS producers and consumers in Spring Boot 3.

    298 GitHub stars~556 tokensUpdated 18 days ago
    Backend & APIsAuto-check passed
  • Event Driven Messaging

    rrezartprebreza/spring-boot-skills

    A skill your agent uses when implementing Kafka, RabbitMQ, Pulsar, or JMS producers and consumers in Spring Boot 4.

    298 GitHub stars~657 tokensUpdated 18 days ago
    Backend & APIsAuto-check passed
  • Kafka Configuration

    Amplicode/spring-skills

    Configures Spring Boot's Kafka starter through application.properties / application.yml.

    126 GitHub stars~4k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • A skill your agent uses when you need to design or implement Kafka messaging in Spring Boot — including topic design, producer/consumer implementation, JSON serialization with Boot factory…

    447 GitHub stars~561 tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • A skill your agent uses when you need to implement acceptance tests from maintainer-authored or maintainer-sanitized Gherkin scenario facts for Spring Boot applications — including selecting…

    447 GitHub stars~1.2k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • A skill your agent uses when you need to implement acceptance tests from maintainer-sanitized Gherkin scenario facts for framework-agnostic Java (no Spring Boot, Quarkus, Micronaut) — confirming…

    447 GitHub stars~1.3k tokensUpdated 2 days ago
    Testing & QAAuto-check passed

More from giuseppe-trisciuoglio/developer-kit

All 115 skills in this repo
  • Nestjs Drizzle Crud Generator

    giuseppe-trisciuoglio/developer-kit

    Generates complete CRUD modules for NestJS applications with Drizzle ORM.

    356 GitHub stars~1.3k tokensUpdated 29 days ago
    Auto-check: notes
  • Spring Boot Actuator

    giuseppe-trisciuoglio/developer-kit

    Provides patterns to configure Spring Boot Actuator for production-grade monitoring, health probes, secured management endpoints, and Micrometer metrics across JVM services.

    356 GitHub stars~2.2k tokensUpdated 29 days ago
    Auto-check: notes
  • Spring Boot Crud Patterns

    giuseppe-trisciuoglio/developer-kit

    Provides and generates complete CRUD workflows for Spring Boot 3 services.

    356 GitHub stars~2.5k tokensUpdated 29 days ago
    Auto-check: notes
  • Spring Boot Security JWT

    giuseppe-trisciuoglio/developer-kit

    Provides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based…

    356 GitHub stars~3.9k tokensUpdated 29 days ago
    Auto-check: notes
  • AWS CLI Beast

    giuseppe-trisciuoglio/developer-kit

    Provides advanced AWS CLI patterns for managing EC2, Lambda, S3, DynamoDB, RDS, VPC, IAM, and CloudWatch.

    356 GitHub stars~1.7k tokensUpdated 29 days ago
    Auto-check: notes
  • PR Review Comments

    giuseppe-trisciuoglio/developer-kit

    Posts review findings from a JSON file as inline comments on a GitHub Pull Request, attaching each comment to its file and line.

    356 GitHub stars~1k tokensUpdated 29 days ago
    Auto-check: notes

Categories

Questions about Spring Boot Event Driven Patterns

What does Spring Boot Event Driven Patterns do?

Provides Event-Driven Architecture (EDA) patterns for Spring Boot — creates domain events, configures ApplicationEvent and @TransactionalEventListener, sets up Kafka producers and consumers, and…. Spring Boot Event Driven Patterns is an agent skill from giuseppe-trisciuoglio/developer-kit. 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.

When should I use Spring Boot Event Driven Patterns?

Spring Boot Event Driven Patterns fits situations like: implementing event-driven systems in Spring Boot; setting up async messaging with Kafka; publishing domain events from DDD aggregates; needing reliable event publishing with the outbox pattern.

How do I install Spring Boot Event Driven Patterns in Claude Code?

Run `npx skills add giuseppe-trisciuoglio/developer-kit --skill spring-boot-event-driven-patterns -a claude-code`. Or copy the skill folder (plugins/developer-kit-java/skills/spring-boot-event-driven-patterns in giuseppe-trisciuoglio/developer-kit) into .claude/skills/spring-boot-event-driven-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Spring Boot Event Driven Patterns in Codex?

Run `npx skills add giuseppe-trisciuoglio/developer-kit --skill spring-boot-event-driven-patterns -a codex`. Or copy the skill folder (plugins/developer-kit-java/skills/spring-boot-event-driven-patterns in giuseppe-trisciuoglio/developer-kit) into .agents/skills/spring-boot-event-driven-patterns in your project. Codex loads it when a task matches its description.

Can I use Spring Boot Event Driven Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add giuseppe-trisciuoglio/developer-kit --skill spring-boot-event-driven-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/spring-boot-event-driven-patterns, .gemini/skills/spring-boot-event-driven-patterns, .github/skills/spring-boot-event-driven-patterns and .opencode/skills/spring-boot-event-driven-patterns in your project.

What does Spring Boot Event Driven Patterns need to run?

SKILL.md names no scripts, command-line tools or credentials: Spring Boot Event Driven Patterns is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash.

Does Spring Boot Event Driven Patterns access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Spring Boot Event Driven Patterns safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Spring Boot Event Driven Patterns use?

Spring Boot Event Driven Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Spring Boot Event Driven Patterns use?

About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 23k tokens, read only when the agent opens those files.

What are the alternatives to Spring Boot Event Driven Patterns?

Skills that share tags, products or a category with Spring Boot Event Driven Patterns: Event Driven Messaging (rrezartprebreza/spring-boot-skills, 298 stars), Event Driven Messaging (rrezartprebreza/spring-boot-skills, 298 stars), Kafka Configuration (Amplicode/spring-skills, 126 stars) and 314 Frameworks Spring Kafka (jabrena/plinth, 447 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Spring Boot Event Driven Patterns?

giuseppe-trisciuoglio (a GitHub user) maintains it in giuseppe-trisciuoglio/developer-kit, which has 356 GitHub stars. The repository holds 115 skills in this directory. The repository was last updated on September 10, 2026.

Source: giuseppe-trisciuoglio/developer-kit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.