Closed m-romandic-un1 closed 1 month ago
Same issue here. Seems a little counterintuitive, especially since there's only a .forRoot() on the module and not a forModule or similar. How do we accomplish this? I would think it's a very common requirement.
@m-romandic-un1 You can create a global module by adding @Global
decorator which will be imported across your library. If not, you can make sure that your module (re)-exports the RabbitMQ module and so when any consumer attempts to import your module, the RabbitMQ will be exported.
LMK if that works for you
@Ziao We don't offer .forFeature
, that could be a potential enhancement
RabbitMQ gets registered on root module level, but when I want to Inject AmqpConnection in other module for publish/request purposes it says that I cannot access it. Why RabbitMQ is not global, how to achieve it?