@node-ts/bus is a node-based library that aims to simplify the development of resilient message-based applications. By handling the technical aspects of the underlying bus transport, it enables developers to focus on creating loosely coupled systems with less boilerplate.
@node-ts/bus allows developers to specify messages and message handlers. It then manages the message transport, subscriptions, and retries behind the scenes. In case of failure, messages are returned to the queue for retry, promoting application resilience.
Additionally, the library provides message workflows, or sagas, to help developers coordinate multiple messages and handlers in longer running processes. As a result, applications built with @node-ts/bus can be more robust, self-healing, and resistant to data loss or corruption.
Requires Node.js 24 or later.
Documentation · Upgrading to 2.0
- @node-ts/bus-core - The bus: sending and receiving messages, handlers, workflows and retries, with an in-memory transport and persistence
- @node-ts/bus-messages - The base types of commands, events and their attributes, used to declare your own messages
- @node-ts/bus-cli - Command line tools, including
bus generate-message-types, which lets the bus restore Dates and class instances in messages - @node-ts/bus-rabbitmq - A RabbitMQ transport
- @node-ts/bus-sqs - An Amazon SQS transport
- @node-ts/bus-sqs-lambda - A receiver that handles SQS messages in AWS Lambda
- @node-ts/bus-postgres - A Postgres persistence for workflow state
- @node-ts/bus-mongodb - A MongoDB persistence for workflow state
- @node-ts/bus-test - The conformance test suites for transport and persistence adapters
To work on the library itself, see CONTRIBUTING.md: setup, the scripts, tests and local infrastructure, the design principles every API follows, and changesets and releases. Upgrading from 1.x is covered in MIGRATING.md.