Support Module register with undefined config: RabbitMQModule.forRoot(RabbitMQModule, undefined)
huantaoliu opened this issue · comments
I have a usecase where my rabbitmq config is dynamic, I want register Rabbitmq Module with undefined config
RabbitMQModule.forRoot(RabbitMQModule, undefined)
Latter in my code, I will use connectionManager
myself to init connection and register handler.
Currently it forces me to use a config when importing Rabbitmq module, and url
is mandary in RabbitMQConfig
, And this registerHandlers: false
still requires us provide rabbitmqconfig at module import time.
If aggreed, I want to support: RabbitMQModule.forRoot(RabbitMQModule, undefined)
@huantaoliu I'm okay having an optional config as long as it doesn't break any existing feature. If you're willing to push a PR i'll be glad to review.
I don't think we need the explicit undefined but feel free to propose something.