For the complete documentation index, see llms.txt. This page is also available as Markdown.

Introduction

@nestjstools/messaging

npm install @nestjstools/messaging
or
yarn add @nestjstools/messaging

A NestJS library for managing asynchronous and synchronous messages (service bus) with support for buses, handlers, channels, and consumers. This library simplifies building scalable and decoupled applications by facilitating robust message handling pipelines while ensuring flexibility and reliability.

Features

  • Message Buses: Define multiple buses for commands, events, and queries to streamline message routing.

  • Handlers: Easily register and manage handlers for processing messages.

  • Channels: Support for in-memory channels and easy extension to create custom channel implementations tailored to your needs.

  • Consumers: Run message consumers to process queued messages asynchronously, ensuring system reliability and fault tolerance.

  • Middleware Support: Add custom middleware for message transformation such like validation, logging - do whatever you want.

  • Debug Mode: Enable enhanced logging and debugging capabilities for development.

  • Extensibility: Creating new channels is straightforward, allowing developers to expand and integrate with external systems or protocols effortlessly.

  • Concurrent Handler Execution: Messages dispatched to multiple handlers are processed concurrently, improving performance and responsiveness across your system.

Create an Event-driven app

Process logic in SYNC way in your handlers

Real-world app example

Repositories

Last updated

Was this helpful?