Skip to content

postal

Pub/sub message bus for JavaScript and TypeScript. Wildcard subscriptions, channel-scoped messaging, and zero dependencies.

TypeScript-First

Written in TypeScript with full type inference. Channels, topics, and payloads are all type-checked — including wildcard subscriptions.

AMQP-Style Wildcards

Subscribe with * (one segment) and # (zero or more). Topic matching follows the same rules as AMQP, with results cached for performance.

Channel-Scoped Messaging

Organize messages into named channels. Each channel is a singleton with its own subscriber list. Default channel is "/" — use as many as you need.

Request / Handle RPC

Built-in correlation-based RPC. Send a request, register a handler, get a Promise back. Timeouts, error propagation, and typed payloads included.

Wire Taps

Attach global observers that see every envelope flowing through the bus. Ideal for logging, debugging, and audit trails. Errors in wiretaps never affect dispatch.

Zero Dependencies

No lodash, no framework lock-in, no transitive dependency tree to audit. Just postal and your code.