@opra/rabbitmq
v1.29.3
Published
Opra RabbitMQ adapter
Readme
@opra/rabbitmq
Standalone RabbitMQ transport adapter for the OPRA framework
🌐 Documentation · 🚀 Getting Started · 📦 Packages · 💬 Issues
Standalone RabbitMQ transport adapter for the OPRA framework. Handle queue messages with OPRA's operation model — validation, content-type parsing, and routing included.
Features
RabbitmqAdapter— Platform adapter for RabbitMQ connection and queue subscription managementRabbitmqContext— Per-message context with typed access to queue, consumer, content, headers, and reply function- Content-type aware message parsing (JSON, plain text, binary)
- Compression support: gzip, deflate, brotli
- Queue configuration and dead-letter exchange support
Installation
npm install @opra/rabbitmqUsage
import { RabbitmqAdapter } from '@opra/rabbitmq';
const adapter = new RabbitmqAdapter(apiDocument, {
url: 'amqp://localhost',
queues: [{ name: 'orders', prefetch: 10 }],
});
await adapter.initialize();
await adapter.start();For NestJS integration use
@opra/nestjs-rabbitmq.
Node Compatibility
- node >= 20.x
License
Available under MIT license.
