Open ckfngod opened 3 months ago
@ckfngod What's the expected outcome? Shall we have an explicit property config to prevent such randomness? I'm not sure regarding the follow up item here but i welcome proposals
@underfisk I expected it to not assert a queue if no config is provided for a handler name regardless of how that happens. It just seems kind of strange that an explicit empty config array behaves differently than a missing property key when they both mean config is missing.
@ckfngod I see what you mean. Well i haven't used in awhile and probably never ran into this issue but i'm open to allow a PR to fix or a feature flag with the proper fix to avoid any outage. If you have the capacity to contribute such change, i would appreciate it a lot 🙏
Similar to https://github.com/golevelup/nestjs/issues/667
If I use
RabbitSubscribe
with a handler name but do not provide a corresponding handler config toRabbitMQModule
thenamq.gen-*
queues are asserted. For example:Given handlers:
With
RabbitMQModule
config:Then a
amq.gen-*
queue is asserted because of the missinghandlerC
property in the config object. The empty array forhandlerB
does not cause aamq.gen-*
queue to be asserted.