golevelup / nestjs

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

rabbitmq: canceled consumers are resumed if connection/channel reconnects #725

Open ttshivers opened 5 months ago

ttshivers commented 5 months ago

An explicitly canceled consumer through cancelConsumer is reapplied on connection reconnection since the setup method is ran again which registers the subscribers again.

ttshivers commented 5 months ago

I think we might want to register and cancel the consumers with amqp-connection-manager's ChannelWrapper methods consume and cancel https://github.com/jwalton/node-amqp-connection-manager/blob/599d31f01d2e13d6a049bd7645e39e5de99d0293/src/ChannelWrapper.ts#L721 once outside of the setup which is run on every reconnect.

github-actions[bot] commented 3 days ago

This issue is stale because it has been open for 30 days with no activity.