malky-outbox-pattern

Generate outbox migration, Debezium config, Avro schemas, and Kafka topic naming.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/mmacphail/my-claude-rules --skill malky-outbox-pattern
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: malky-outbox-pattern
Source: https://github.com/mmacphail/my-claude-rules/tree/main/malky-outbox-pattern
Command: npx skills add https://github.com/mmacphail/my-claude-rules --skill malky-outbox-pattern

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures reliable, end-to-end event publication by implementing the Transactional Outbox Pattern across API projects. Generates the outbox migration, Debezium connector configuration with field-by-field annotations, Avro schemas for the Schema Registry, and comprehensive Kafka topic naming guidance to ensure correct routing and ordering.

Core Features & Use Cases

  • Outbox table migration for each aggregate to guarantee atomic emission of events within a database transaction.
  • Debezium connector configuration with explicit field-level annotations, topic routing, and error handling to publish events to Kafka.
  • Avro schemas for event envelopes and aggregate state stored in a schema registry with forward-transitive compatibility.
  • Kafka topic naming documentation that clearly separates event history topic from compacted current-state topic and ensures per-aggregate ordering.

Quick Start

Generate the outbox artifacts for an aggregate by creating the migration, Debezium config, Avro schemas, and Kafka topic naming documentation.

Frequently Asked Questions about malky-outbox-pattern

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

FAQPage Schema
How do I implement the transactional outbox pattern with Kafka and Debezium?

The transactional outbox pattern is implemented by generating an outbox table migration, Debezium connector configuration with field-level annotations, Avro schemas, and Kafka topic naming guidance to ensure atomic event publication. This guarantees reliable end-to-end routing and ordering.

Why do I need Avro schemas and forward-transitive compatibility in a schema registry for event publishing?

Avro schemas with forward-transitive compatibility are required to store event envelopes and aggregate state safely in the schema registry. This enforces schema evolution rules so that consumers can read data across different versions without breaking downstream event processing.

How do I ensure per-aggregate event ordering when publishing to Kafka topics?

Per-aggregate event ordering is ensured by partitioning Kafka topics by aggregate_id and requiring event_data to contain the full aggregate state. Topics are clearly separated into an event history topic and a compacted current-state topic for correct routing.

Can I use the transactional outbox pattern across different API language stacks?

Yes, the transactional outbox pattern can be applied across different API language stacks. It generates stack-agnostic artifacts including database migrations, Debezium configs, and Avro schemas that coordinate atomic event emission within a database transaction.

How do I make event publication idempotent with Debezium and Kafka?

Idempotent event publication is achieved by using a unique event_id for each outbox record. Combined with Debezium connector configuration and field-level annotations, this ensures events are reliably tracked and prevents duplicate processing by downstream Kafka consumers.

When do I need a compacted current-state topic versus an event history topic in Kafka?

A compacted current-state topic is needed to maintain the latest aggregate state, while an event history topic preserves the full sequence of events. Kafka topic naming documentation separates these to ensure correct routing and per-aggregate ordering.