Skip to main content
Lender publishes CloudEvents 1.0 in binary content mode through lib-streaming v3. Business emission is outbox-only and at least once: the domain write and outbox envelope share one database transaction, and the relay publishes after commit.

Application-stream contract

  • ce-source: lender
  • Facts: lerian.streaming.lender
  • Commands: lerian.streaming.lender.commands
  • Route dead letters: lerian.streaming.lender.dlq
  • ce-type: studio.lerian.lender.<resource>.<event>
  • Dispatch key: <resource>.<event> from ce-resourcetype and ce-eventtype
The topic identifies the producing application and stream class, not one event. Route on CloudEvents headers, not on a per-event topic name. Lender serves the exact catalog and application topics at GET /api/v1/streaming/manifest.

Emitted events

The catalog declares 35 definitions. Lender has production callers for 31 of them: 29 facts and 2 commands. The table separates catalog keys from the CloudEvent routing type.

Emitted payload contracts

The contracts below mirror the CloudEvent data JSON tags in the published Lender contract. ? means the field can be absent. The Go wire structs declare no nullable pointer fields. unknown is raw JSON and may carry any JSON value, including null. Decimal values are JSON strings, timestamps are UTC RFC 3339 strings, and YYYYMM is a six-digit competência.
Definition key: accounting_profile.configuredTopic: lerian.streaming.lenderSchema: 1.0.0Subject: profile_id
Definition keys: assignment_set.approved, assignment_set.acceptedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: assignment_set_idA cession composition is durably approved. The event identifies the immutable approval that determines the offer file.
A fund administrator accepts the entire cession. The event reports the set-level money totals after the write-off of the receivables from the tenant portfolio.
Definition keys: collection.payment.applied, collection.payment.unapplied, collection.payment.reapplied, collection.payment.refundedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: application_id
Definition key: loan_application.submittedTopic: lerian.streaming.lenderSchema: 2.0.0Subject: loan_application_id
Definition key: loan_application.approvedTopic: lerian.streaming.lenderSchema: 2.0.0Subject: loan_application_id
Definition key: loan_application.rejectedTopic: lerian.streaming.lenderSchema: 2.0.0Subject: loan_application_id
Definition key: loan_application.withdrawnTopic: lerian.streaming.lenderSchema: 2.0.0Subject: loan_application_id
Definition key: loan_application.disbursedTopic: lerian.streaming.lenderSchema: 2.0.0Subject: loan_application_id
Definition key: loan_charge.appliedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: loan_account_id
Definition key: loan_product.createdTopic: lerian.streaming.lenderSchema: 1.0.0Subject: loan_product_id
Definition key: loan_product.activatedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: loan_product_id
Definition key: loan_product_version.createdTopic: lerian.streaming.lenderSchema: 1.0.0Subject: loan_product_version_id
Definition key: loan_schedule.prepayment_appliedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: schedule_version_id
Definition key: loan_schedule.rescheduledTopic: lerian.streaming.lenderSchema: 1.0.0Subject: schedule_version_id
Definition key: repayment.recordedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: transaction_id
Definition key: repayment_reversal.recordedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: transaction_id
Definition key: loan_account.pdd_stage_transitionedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: loan_account_id
Definition key: prepayment_quote.createdTopic: lerian.streaming.lenderSchema: 1.0.0Subject: quote_id
Definition key: prepayment_settlement.recordedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: settlement_id
Definition key: loan_account.debt_balance_changedTopic: lerian.streaming.lenderSchema: 2.0.0Subject: loan_account_id
Definition key: loan_account.payment_overdueTopic: lerian.streaming.lenderSchema: 1.0.0Subject: loan_account_id
Definition key: consignado.exclusao.requestedTopic: lerian.streaming.lender.commandsSchema: 1.0.0Subject: request_ref
Definition key: consignado.redirecionamento.requestedTopic: lerian.streaming.lender.commandsSchema: 1.0.0Subject: request_ref
Definition key: payroll_deduction.refund_requiredTopic: lerian.streaming.lenderSchema: 1.0.0Subject: receipt_id
Definition key: payroll_overdeduction.refund_requiredTopic: lerian.streaming.lenderSchema: 1.0.0Subject: refund_case_id
Definition key: collection.instruction.issuedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: instrument_id
Definition key: guarantee_recovery.cash_allocatedTopic: lerian.streaming.lenderSchema: 1.0.0Subject: receipt_id

Cataloged but not emitted

These four definitions are present in the manifest but have no non-test Lender emission caller. Do not treat their lender-sourced forms as operational integrations.

Events consumed

Lender wires 15 gateway fact keys from lerian.streaming.consignado-gw and one Matcher fact from lerian.streaming.matcher. Each consumer is configuration-gated and registered in bootstrap. The gateway has emission paths for the first 13 listed gateway keys. The portability pair reaches Lender only when its outcome consumer is enabled and the deployed gateway manifest declares the event. The manifest does not declare the two refinance outcomes, so those two listeners receive no traffic from the current gateway runtime. Lender does not register consignado.proposal.accepted. That key is not a Lender booking input.

Internal event planes

Lender also writes internal outbox event types for ledger intents, collection work, and signed hub handoffs. They are process-local coordination contracts, not lib-streaming CloudEvents catalog entries. This public inventory omits them on purpose.

Delivery and compatibility rules

  • Deduplicate by (ce-source, ce-id) and make handlers idempotent.
  • Read ce-schemaversion before decoding. The version is a CloudEvents header, never a topic suffix.
  • Money and rates are decimal strings. Timestamps are UTC RFC 3339.
  • The wired fact consumers filter exact keys. They skip and commit unmatched facts on the shared application topics. Malformed handled records follow the consumer DLQ policy.
  • A missing required business identifier prevents emission or command execution. Lender never synthesizes it.