golevelup / nestjs

A collection of badass modules and utilities to help you level up your NestJS applications 🚀
MIT License
2.27k stars 261 forks source link

[feature request] Subscribe `routingKey` as `string | string[]` #783

Closed y-nk closed 1 month ago

y-nk commented 1 month ago

We can't do enum/regex based routing in rabbitmq, so we have no choice but to subscribe individually to many events with many subscribers.

I would like to know if we could add the support for @Subscribe({ routingKey }) to allow multiple routing keys, so that we can eventually compensate the lack of enum based routing in rmq.

I can propose a PR if necessary

WonderPanda commented 1 month ago

Contributions are definitely welcome!

y-nk commented 1 month ago

I have badly looked at the routingKey but it is indeed a string | string[] so i'll be closing this issue. @WonderPanda i already have submitted 2 other PRs nonetheless 🙏