@lesto/pubsub
v0.1.7
Published
Lesto's pub/sub + transport-neutral WebSocket fan-out core: in-process hub, fanout() send policy with backpressure, bounded replay-ring arithmetic, and signed per-channel capability tokens.
Downloads
343
Readme
@lesto/pubsub
Lesto's pub/sub + transport-neutral WebSocket fan-out core: an in-process hub, the
fanout()send policy (with backpressure), a bounded replay-ring eviction helper, and signed per-channel capability tokens.
Part of Lesto, the batteries-included, agent-native fullstack framework.
bun add @lesto/pubsubimport { PubSub } from "@lesto/pubsub";
const hub = new PubSub();
const off = hub.subscribe("orders", (message, channel) => {
/* … */
});
await hub.publish("orders", { id: 1 });
off();In-process only (one process). For cross-process fan-out, pair it with
@lesto/realtime.
Maturity: v0.
