Skip to content

src/dazzle_back/events/outbox.py

Generated: 2026-03-30T04:38:46.151918+00:00

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

Event Outbox for Transactional Event Publishing.

The outbox pattern ensures events are published reliably by writing them to a database table in the same transaction as the business operation. A separate publisher process then drains the outbox to the event bus.

This prevents the "dual write" prob...

Key Exports

  • OutboxStatus
  • OutboxEntry
  • EventOutbox
  • envelope
  • create_table
  • append
  • fetch_pending
  • mark_published
  • mark_failed
  • get_stats
  • cleanup_published
  • get_failed_entries
  • get_recent_entries
  • retry_failed

Dependencies

Imports

  • __future__.annotations
  • dataclasses.dataclass
  • dataclasses.field
  • datetime.UTC
  • datetime.datetime
  • enum.StrEnum
  • typing.Any
  • uuid.UUID
  • dazzle_back.events.envelope.EventEnvelope

Event Interactions

None detected.

Invariants and Assumptions

No invariants documented.

Tests

  • tests/unit/test_outbox_pg.py
  • tests/unit/test_channel_outbox.py
  • tests/unit/test_events.py
  • tests/unit/test_events_api.py

Notes

This page was automatically generated by tools/gen_reference_docs.py.