team-supercharge / nest-amqp

Nest AMQP 1.0 module - NPM package: https://www.npmjs.com/package/@team-supercharge/nest-amqp
https://supercharge.io
MIT License
26 stars 13 forks source link

Handle multiple queues #55

Open raschan opened 2 years ago

raschan commented 2 years ago

add ability for single handler to be attached to multiple queues via the listener

bacloud22 commented 1 year ago

hi @raschan , is it possible in the current version to call Listen() as a regular method ? having a callback which is normally the function being decorated ?

It gives a lot of flexibility I guess without changing the internals of this library I guess ? to be able to listen depending on runtime constraints to one or multiple topics.

Thanks a lot ^^

raschan commented 1 year ago

Hi @yanna92yar You can always inject the QueueService into you own services, and then call this.queueService.listen(...params)

bacloud22 commented 1 year ago

yes my bad I just saw the function ^^ Thanks a lot !!