Event channels
Lerian STA publishes on two channels:
- An audit channel carrying inbound-success and inbound-failure facts for observability and reconciliation.
- A signed business channel, routed as
sta.{direction}.{sanitized-source-product}with anunroutedfallback, for external product consumers. Its terminal event types aresta.transfer.accepted,sta.transfer.rejected,sta.transfer.inconsistent,sta.transfer.canceled, andsta.transfer.download_finished.
Accepted and DownloadFinished events omit it. Inbound-success events carry the claim-check.
The claim-check
On a completed inbound download, Lerian STA emits its terminal download-finished event, routed by the file’s source product. The event carries a claim-check —
object_key, sha256, size_bytes, and file_name — but not the bytes themselves. document_type is included only when non-empty.
The consuming domain product subscribes to its own key. It fetches the durable artefact by its object key and re-verifies the SHA-256. It then reconciles the result into the client’s ledger. Lerian STA is the transport and integrity boundary. The consuming product owns the ledger posting.
Ledger boundary
Lerian STA does not write to the client’s ledger itself. It delivers the file and the claim-check. The consuming product performs the ledger reconciliation — for example, Lerian SISBAJUD for judicial asset-order files. This keeps Lerian STA a pure transport-and-integrity layer, independent of any one file’s business meaning.
Integration conventions
- Commit-coupled events. Every audit or business outbox record becomes available only after its transfer’s state change commits.
- Claim-check, not payload. Consumers receive a reference to the durable artefact, fetch it, and re-verify its SHA-256 before acting on it.
- Keyed subscription. Clients choose their broker subscriptions. STA routes signed business events by direction and sanitized source product, with an
unroutedfallback; it does not enforce that only one subscriber can receive a file.

