Skip to content

src/dazzle_back/events/publisher.py

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

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

Outbox Publisher Loop for Reliable Event Delivery.

The publisher loop is a background task that polls the outbox for pending events and publishes them to the event bus. This decouples the transactional write (to the outbox) from the actual publication (to the bus).

Features: - Polling with configu...

Key Exports

  • PublisherStats
  • PublisherConfig
  • OutboxPublisher
  • stats
  • is_running
  • start
  • stop
  • drain
  • get_status

Dependencies

Imports

  • __future__.annotations
  • asyncio
  • logging
  • collections.abc.Awaitable
  • collections.abc.Callable
  • dataclasses.dataclass
  • dataclasses.field
  • datetime.UTC
  • datetime.datetime
  • typing.Any
  • uuid.uuid4
  • dazzle_back.events.bus.EventBus
  • dazzle_back.events.bus.PublishError
  • dazzle_back.events.outbox.EventOutbox
  • dazzle_back.events.outbox.OutboxEntry

Event Interactions

None detected.

Invariants and Assumptions

  • Validates: connect is required
  • Validates: bus is required

Tests

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

Notes

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