amqp icon indicating copy to clipboard operation
amqp copied to clipboard

Why aren't channels closed when no longer needed?

Open jeffdeville opened this issue 1 year ago • 0 comments

We're having issues where when a worker that has subscribed to messages crashes, it's corresponding channel is not closed

The SelectiveConsumer monitors the processes that are receiving messages. But when those processes are all gone, it never closes the channel. So the channels are getting zombied.

Near as I can tell, the DirectConsumer has the same behavior. There's even a note about how you should always explicitly close the channels. But I can't figure out why neither consumer does it when it seems like it's clear that it should

It looks like, based on the way the channel_sup works, that if the consumer kills itself when it has no one to talk to, that ought to do it. But this seems too obvious and conspicuous to have been an oversight, so I thought I'd see if someone could point out what I'm missing.

jeffdeville avatar Dec 10 '23 18:12 jeffdeville