outbox

Implements a .NET outbox for reliable event publishing with inbuilt error handling and logging.

Updated Feb 20, 2026
One-click install
npx skills add https://github.com/yeeehaooo/WorkSpace --skill outbox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: outbox
Source: https://github.com/yeeehaooo/WorkSpace/tree/main/skills/dotnet/patterns/outbox
Command: npx skills add https://github.com/yeeehaooo/WorkSpace --skill outbox

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensure reliable event publishing and message delivery by storing events in the same transaction as domain changes, solving the dual-write problem.

Core Features & Use Cases

  • Atomic outbox integration that persists domain events alongside state changes to guarantee delivery.
  • Background publisher that reads unpublished outbox messages and publishes them to the message broker or event bus.
  • Idempotent handling and retry with backoff to achieve eventual consistency.
  • Clear separation of concerns across Domain, Application, and Infrastructure layers.

Use Case: Imagine an e-commerce workflow where orders and related events must be published reliably even if the application crashes.

Quick Start

Start by wiring your domain events into the outbox within your unit of work, then run the OutboxPublisher in the background to deliver events reliably.

Frequently Asked Questions about outbox

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

FAQPage Schema
What is the transactional outbox pattern for reliable event publishing?

It solves the dual-write problem by persisting domain events in the same transaction as state changes. This guarantees reliable event publishing and eventual consistency across distributed services even if the application crashes.

How do I implement an outbox pattern in a dotnet event-driven architecture?

Wire domain events into the outbox within your unit of work, then run a background publisher. The publisher reads unpublished messages and publishes them to the message broker or event bus with retry logic and idempotent handling.

How does the outbox pattern handle idempotency and eventual consistency?

It achieves eventual consistency through idempotent handling and retry with backoff. This ensures that duplicate message deliveries to the event bus do not create duplicate side effects across distributed services.

When do I need an outbox for distributed systems with dual-write concerns?

You need an outbox for distributed systems requiring guaranteed delivery and eventual consistency across services. It is essential whenever dual-write concerns threaten atomic state changes and event publishing in event-driven workflows.

Does the outbox pattern work with domain-driven design layer separation?

Yes, it implements the outbox inside the Application and Infrastructure layers. This maintains clear separation of concerns across Domain, Application, and Infrastructure layers while isolating domain logic from messaging infrastructure.

What are the limitations of using a background publisher for outbox messages?

The main limitation is delivery latency, as a background publisher reads and publishes messages asynchronously. While retry with backoff handles transient broker failures, the system achieves eventual consistency rather than immediate real-time delivery.