golevelup / nestjs

A collection of badass modules and utilities to help you level up your NestJS applications 🚀

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rabbitmq: canceled consumers are resumed if connection/channel reconnects

ttshivers opened this issue · comments

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

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.