Skip to content

src/dazzle_back/events/kafka_bus.py

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

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

Kafka-Backed Event Bus for Production.

KafkaBus provides a production-grade implementation of the EventBus interface using Apache Kafka via the aiokafka library.

Features: - High throughput, low latency event streaming - Durable event storage with configurable retention - Consumer group coordinati...

Key Exports

  • KafkaConfig
  • ActiveSubscription
  • KafkaBus
  • create_kafka_bus
  • from_env
  • get_common_config
  • connect
  • close
  • publish
  • subscribe
  • unsubscribe
  • ack
  • nack
  • replay
  • get_consumer_status
  • list_topics
  • list_consumer_groups
  • get_topic_info

Dependencies

Imports

  • __future__.annotations
  • asyncio
  • json
  • logging
  • os
  • collections.abc.AsyncIterator
  • dataclasses.dataclass
  • dataclasses.field
  • datetime.UTC
  • datetime.datetime
  • typing.Any
  • uuid.UUID
  • dazzle_back.events.base_event_bus.BaseEventBus
  • dazzle_back.events.bus.ConsumerNotFoundError
  • dazzle_back.events.bus.ConsumerStatus
  • dazzle_back.events.bus.EventBusError
  • dazzle_back.events.bus.EventHandler
  • dazzle_back.events.bus.NackReason
  • dazzle_back.events.bus.PublishError
  • dazzle_back.events.bus.SubscriptionError

Event Interactions

Emits: app.Order

Invariants and Assumptions

No invariants documented.

Tests

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

Notes

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