Current event surface: Kafka
Enable publication on each producing service:
STREAMING_CLOUDEVENTS_SOURCE when you enable streaming. Use ledger for the ledger, CRM, and Fees binary. Use 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>. Headers ce-resourcetype and ce-eventtype carry the dispatch key separately. The ce-tenantid header is always present for Midaz. It carries the resolved tenant ID in multi-tenant scope, and the literal default in single-tenant or tenantless scope. Payload schema is 1.0.0 for the current catalog.
The ledger and Tracer each serve their public JSON business-event 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. Midaz logs publication failures and does not return them 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 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 you enable the producer, hub ingest, and destination runtime. Match on the event key from ce-resourcetype and ce-eventtype. Do not expect a per-event Kafka topic.

