Current event surface — Kafka
Enable publication on each producing service:
STREAMING_CLOUDEVENTS_SOURCE is required when streaming is enabled. Use ledger for the ledger, CRM, and Fees binary and tracer for Tracer; each service rejects any other value at startup.
Midaz uses one v3 application fact topic per producing service:
- Ledger, CRM, and Fees:
lerian.streaming.ledger - Tracer:
lerian.streaming.tracer
organization.createdrideslerian.streaming.ledgertransaction.postedrideslerian.streaming.ledgerfee_charge.appliedrideslerian.streaming.ledgerrule.createdrideslerian.streaming.tracer
studio.lerian.<source>.<resource>.<event>. ce-resourcetype and ce-eventtype carry the dispatch key as separate headers. Payload schema is 1.0.0 for the current catalog.
The ledger and Tracer each serve their exact catalog and topic mapping at:
Delivery semantics
Midaz publishes these business events directly after the state change. It does not persist them in a streaming outbox, and publication failures are logged rather than returned to the business command. Consumers must still be idempotent and deduplicate on(ce-source, ce-id) because broker delivery can repeat a published record. Money values use decimal strings; never parse them as binary floating point.
Consumer checklist
- Read the producer manifest.
- Subscribe to the producer’s application topic.
- Route on
ce-resourcetypeandce-eventtype, not on payload shape. - Validate
ce-schemaversionbefore decoding. - Persist your deduplication key before acknowledging the record.
Legacy RabbitMQ surface
Midaz also maintains legacy RabbitMQ exchanges for selected transaction, overdraft, and audit events. This is not the complete lib-streaming catalog. The bundled example configuration ships these outbound exchanges disabled. If you enable them, you own queue bindings,
ack/nack, dead-lettering, retries, and consumer isolation. The internal async transaction balance-operation pipeline controlled by RABBITMQ_TRANSACTION_ASYNC is not a public event feed.
Use the Kafka surface for new integrations unless you explicitly depend on a legacy RabbitMQ contract.
Streaming Hub compatibility
Streaming Hub follows the v3 Midaz application topics
lerian.streaming.ledger and lerian.streaming.tracer. A subscription can therefore receive Midaz facts when the producer, hub ingest, and destination runtime are enabled. Match on the event key from ce-resourcetype and ce-eventtype; do not expect a per-event Kafka topic.

