Skip to content

addWiretap

addWiretap(callback): () => void

Defined in: packages/postal/src/channel.ts:352

Registers a global observer that sees every envelope flowing through the bus.

Wiretaps fire for local publishes, requests, handler replies, and inbound envelopes arriving from transports. Errors thrown by wiretaps are silently swallowed — they must never affect message dispatch.

(envelope) => void

Called with the full envelope for every message

Unsubscribe function (idempotent)

(): void

void