Skip to main content
Midaz emits CloudEvents for ledger, CRM, Fees, and Tracer business facts. The current complete contract is the Kafka/lib-streaming surface. Legacy RabbitMQ exchanges carry only a narrower compatibility subset.

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
Examples:
  • organization.created rides lerian.streaming.ledger
  • transaction.posted rides lerian.streaming.ledger
  • fee_charge.applied rides lerian.streaming.ledger
  • rule.created rides lerian.streaming.tracer
The CloudEvents type is source-qualified: 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:
The manifest route remains available even when publication is disabled. Use it as the deployment-time contract instead of guessing topics. The Midaz event reference and Tracer event reference list every event and payload.

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

  1. Read the producer manifest.
  2. Subscribe to the producer’s application topic.
  3. Route on ce-resourcetype and ce-eventtype, not on payload shape.
  4. Validate ce-schemaversion before decoding.
  5. 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.

Decision