Skip to main content
Lender emits domain events as CloudEvents 1.0 messages in binary content mode over Kafka, published through lib-streaming. Every event travels in the shared envelope: ce-type names the event as studio.lerian.<resource>.<event>, ce-subject carries the aggregate id, ce-tenantid the owning tenant, and ce-schemaversion the payload version — 2.0.0 for the loan_application.* events, whose topics carry the .v2 suffix, and 1.0.0 for every other event below. ce-source comes from STREAMING_CLOUDEVENTS_SOURCE, and Lender enforces the value lender when streaming is enabled — booting with any other value fails. Topics derive from the source (see Topic naming), so every emitted event lands on lender.<resource>.<event>. Every event in Lender’s catalog is outbox-backed: the event row is written in the same database transaction as the state change it reports, and a relay publishes committed rows to Kafka, retrying through broker outages. The catalog does not allow this policy to be weakened per deployment. Money amounts and rates cross the wire as decimal strings, never floats. Lender serves its full event catalog at GET /api/v1/streaming/manifest.

Loan lifecycle events

Servicing events

Collection events

The four collection-payment events share one payload schema; optional fields fill in per flow.

BR jurisdiction events

Consignado commands emitted

Commands Lender sends to the Consignado rail. They keep Lender’s namespace — Consignado subscribes to these lender.* topics (see Consignado events). studio.lerian.consignado_margin.requested (topic lender.consignado_margin.requested) is declared in the catalog and in the manifest, but no Lender flow emits it yet — treat it as a contract reservation, not live traffic. Consignado’s fact events (studio.lerian.consignado_proposal.accepted, studio.lerian.consignado_averbacao.confirmed, and the rest) also appear in Lender’s manifest for contract documentation, but their producer is the Consignado rail — see the Consignado events page for those payloads.

Events consumed

Consumers are opt-in per deployment: each has an enable flag (default off) and fails at boot when enabled without a reachable broker. Two Consignado facts are documented contracts, not live Lender consumers. consignado_proposal.accepted now travels on consignado-gw.consignado_proposal.accepted.v2 with schema 2.0.0, as a post-averbação witness rather than a booking input (see Consignado events); Lender’s handler and manifest still pin the unsuffixed consignado-gw.consignado_proposal.accepted topic with schema 1.0.0, which no producer emits, and the consumer is not wired into any deployment, so this post-averbação witness flow is not live end to end. consignado-gw.consignado_contract.registered, the only fact that books a contract downstream, has a durable-inbox handler implemented, but its consumer cannot be enabled yet: Lender fails at boot until the booking processor ships. Check the streaming manifest of your deployment before depending on either fact.