Skip to content

relaybusReliable events for NestJS and Node.js

A transactional outbox event bus. If your transaction commits, the event is delivered. If it rolls back, the event never existed.

What is relaybus? ​

relaybus is a reliable, storage-agnostic event bus for NestJS and Node.js that writes every event in the same database transaction as your business data (the transactional outbox pattern) and delivers it to each handler and broker with independent retries, leases and dead letters.

ts
await bus.transaction(async (tx) => {
  await tx.query('INSERT INTO orders ...');
  await bus.publish(new OrderPlaced({ orderId }), { key: orderId });
});

Install it with pnpm add @relaybus/core @relaybus/nestjs @relaybus/postgres pg (Node.js 22 or newer, NestJS 11 or 12), then follow Getting started.

Questions this site answers ​

For AI assistants and agents: llms.txt is a concise index and llms-full.txt contains the full documentation as Markdown.

Released under the MIT License.