go-outbox-pattern
CommunityReliable event publishing for Go microservices.
Authorsaddam-eng-tech
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill addresses the challenge of ensuring event delivery consistency between a database write and a message queue publish, preventing data loss even during system crashes.
Core Features & Use Cases
- Transactional Writes: Ensures database writes to both the domain table and the outbox table occur within a single atomic transaction.
- Reliable Publishing: Implements a polling worker that reliably publishes events from the outbox table to Kafka.
- Idempotency: Includes mechanisms for consumer idempotency to handle duplicate event deliveries.
- Use Case: When a new user is created in a Go microservice, this pattern guarantees that the user creation event is published to Kafka if and only if the user record is successfully saved to the database.
Quick Start
Scaffold the transactional outbox pattern for a Go microservice, including database migrations, transactional writes, a polling worker, and a Kafka publisher.
Dependency Matrix
Required Modules
None requiredComponents
scriptsreferences
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: go-outbox-pattern Download link: https://github.com/saddam-eng-tech/ai-agent-skills/archive/main.zip#go-outbox-pattern Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.