transactional-outbox

Implement the Outbox pattern with Debezium CDC to publish events to Kafka.

1|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/kssumin/claude-playground --skill transactional-outbox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: transactional-outbox
Source: https://github.com/kssumin/claude-playground/tree/main/.claude/skills/transactional-outbox
Command: npx skills add https://github.com/kssumin/claude-playground --skill transactional-outbox

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Transactional Outbox + CDC references describe how to solve the atomicity problem between persisting business data and emitting the corresponding event to a message broker. By storing the event in an outbox table within the same transaction and using Debezium to monitor and publish the change, you prevent inconsistencies such as lost or ghost messages.

Core Features & Use Cases

  • Outbox table design with a matching JPA entity to persist business data and the outgoing event in a single transaction
  • Debezium CDC integration to reliably route outbox changes to Kafka
  • Optional polling publisher as a deterministic fallback for event delivery
  • Idempotent consumers and recovery scenarios to maintain exactly-once-ish semantics

Quick Start

Implement the Outbox pattern by persisting both the business data and the outbox record in a single transaction, then enable Debezium CDC to stream outbox events to Kafka.

Frequently Asked Questions about transactional-outbox

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I publish events to Kafka atomically with database writes to prevent lost or ghost messages?

To publish events to Kafka atomically with database writes, use the transactional outbox pattern to persist business data and an outbox record in a single transaction, then use Debezium CDC to reliably route outbox changes to Kafka.

What is the transactional outbox pattern and how does Debezium CDC work with it?

The transactional outbox pattern solves atomicity gaps by saving business data and an event record in one database transaction. Debezium CDC captures outbox table changes and streams them to Kafka, ensuring reliable event-driven messaging without lost or ghost messages.

How do I implement the outbox pattern with JPA and Debezium for microservices?

Implement the outbox pattern by creating an outbox table with a matching JPA entity to persist business data and events in a single transaction. Configure a Debezium connector to capture outbox changes and stream them to Kafka for your microservices.

What is the best way to ensure idempotency when consuming events from a transactional outbox?

The best way to ensure idempotency with a transactional outbox is to implement idempotent consumers and recovery scenarios. This maintains exactly-once-ish semantics by safely handling duplicate event delivery across your streaming pipelines.

Can I use a polling publisher instead of Debezium CDC for outbox event delivery?

Yes, you can use an optional polling publisher instead of Debezium CDC. It acts as a deterministic fallback mechanism for event delivery, polling the outbox table to publish events to Kafka when change data capture is unavailable.

When should I not use Debezium CDC for the transactional outbox pattern?

You should not use Debezium CDC if your database does not support change data capture or if you need a simpler deterministic fallback. In these cases, implement an optional polling publisher to read the outbox table and publish events to Kafka.