You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the latest version of these fantastic RabbitMQ-Module. But i can not use the forRoot method like documented in the README. The function parameters look unnormal, why are there two parameters? What is the moduleCtor?
Hey @O1lpunch3r it's my fault for not having updated the docs for this. moduleCtor is just the constructor function for the RabbitMQModule. You can see how to use it here:
This is because the RabbitMQModule is built using @golevelup/nestjs-modules which eliminates almost all of the boilerplate for creating Dynamic Modules with the tradeoff that you need to pass in the Constructor Function yourself when using forRoot / forRootAsync
I have the latest version of these fantastic RabbitMQ-Module. But i can not use the forRoot method like documented in the README. The function parameters look unnormal, why are there two parameters? What is the moduleCtor?
(method) IConfigurableDynamicRootModule<RabbitMQModule, RabbitMQConfig>.forRoot(moduleCtor: Type<RabbitMQModule>, moduleConfig: RabbitMQConfig): DynamicModule Expected 2 arguments, but got 1.
My example implementation like in README:
@Module({ imports: [ RabbitMQModule.forRoot({ exchanges: [ { name: 'exchange1', type: 'topic' } ], uri: 'amqp://rabbitmq:rabbitmq@localhost:5672', connectionInitOptions: { wait: false } }) ], providers: [EventService] }) export class EventModule { }
The text was updated successfully, but these errors were encountered: