@opra/nestjs-rabbitmq
v1.28.5
Published
Opra NestJS RabbitMQ Module
Readme
@opra/nestjs-rabbitmq
NestJS RabbitMQ module for the OPRA framework
🌐 Documentation · 🚀 Getting Started · 📦 Packages · 💬 Issues
NestJS RabbitMQ module for the OPRA framework. Integrate RabbitMQ message consumers into your NestJS application with OPRA's schema-driven operation model.
Features
OpraRabbitmqModule— Dynamically configurable NestJS module (forRoot/forRootAsync)- Full NestJS dependency injection and provider support
- Interceptor middleware pipeline
- Content-type parsing, compression support, and dead-letter exchange handling
Installation
npm install @opra/nestjs-rabbitmqUsage
import { Module } from '@nestjs/common';
import { OpraRabbitmqModule } from '@opra/nestjs-rabbitmq';
@Module({
imports: [
OpraRabbitmqModule.forRoot({
name: 'MyMQAPI',
url: 'amqp://localhost',
queues: [{ name: 'orders', prefetch: 10 }],
controllers: [OrdersController],
providers: [OrdersService],
}),
],
})
export class AppModule {}Async configuration
OpraRabbitmqModule.forRootAsync({
useFactory: (config: ConfigService) => ({
url: config.get('RABBITMQ_URL'),
controllers: [OrdersController],
}),
inject: [ConfigService],
})Node Compatibility
- node >= 20.x
License
Available under MIT license.
