This is a very opinionated abstraction over amqplib to help simplify the implementation of several messaging patterns on RabbitMQ.
!Important! - successful use of this library will require a conceptual knowledge of AMQP and an understanding of RabbitMQ.
- Attempt to gracefully handle lost connections and channels
- Automatically re-assert all topology on re-connection
- Support the majority of RabbitMQ's extensions
- Handle batching of acknowledgements and rejections
- Topology & configuration via JSON (thanks to @JohnDMathis!)
- Built-in support for JSON, binary and text message bodies
- Support for custom serialization
Assumptions & Defaults:
- Fault-tolerance/resilience over throughput
- Prefer "at least once delivery"
- Default to publish confirmation
- Default to ack mode on consumers
- Heterogenous services that include statically typed languages
- JSON as the default serialization provider for object based message bodies
Documentation You Should Read
- Connection Management - connection management
- Topology Setup - topology configuration
- Publishing Guide - publishing and requesting
- Receiving Guide - subscribing and handling of messages
- Logging - how rabbot logs
- Contributor Guide
- Code of Conduct
- Change Log
- Differences From Wascally
This contrived example is here to make it easy to see what the API looks like now that documentation is broken up across multiple pages.
const rabbit = ;rabbot;rabbot;rabbot;rabbot;rabbot;;
- improve support RabbitMQ backpressure mechanisms
- add support for Rabbit's HTTP API