amqp_client icon indicating copy to clipboard operation
amqp_client copied to clipboard

Conflict when combining `seth/pooler` with `jbrisbin/amqp_client`

Open dcheckoway opened this issue 10 years ago • 5 comments

Cc: @seth

We recently bumped into an issue when using seth/pooler to pool RabbitMQ channels. When the pooler culls stale channels, it kills them via exit(Pid, kill) (instead of, say, doing it gracefully via amqp_channel:close).

Long story short, amqp_client interprets the killed channel as an internal_error (541), and it then closes the AMQP connection entirely, which affects all of the other channels on that connection.

Behavior on both sides (pooler and amqp_client) makes sense when considered separately, but when combined, this is a problem. I mention this less as a bug report, and more as a heads-up -- perhaps something that could help other folks if it were documented?

dcheckoway avatar Dec 18 '14 18:12 dcheckoway

Be aware that this is not the official amqp_client repo. Development of said repo is here http://hg.rabbitmq.com/rabbitmq-erlang-client/ and we have discussions about RabbitMQ and related libraries here: https://groups.google.com/forum/#!forum/rabbitmq-users

videlalvaro avatar Jan 06 '15 18:01 videlalvaro

Hi there,

I'd love for us to add a feature to pooler to optionally attempt a graceful shutdown function for pool members. I think that would help this case (and others). It might be that within some timeout we want to resort to the exit/2 call approach, but I agree that adding the ability to specify a stop function for pool members would be generally useful. Would such a feature help this situation?

seth avatar Jan 07 '15 04:01 seth

@seth as I said in mu comment, please discuss this in our RabbitMQ forum linked above

videlalvaro avatar Jan 07 '15 10:01 videlalvaro

@videlalvaro is there a thread I can reply to? I just went to look and didn't find any hits searching the list for pooler.

seth avatar Jan 11 '15 18:01 seth

@seth not that I know of, but you can start your own thread

videlalvaro avatar Jan 11 '15 18:01 videlalvaro