amqp_client
amqp_client copied to clipboard
Conflict when combining `seth/pooler` with `jbrisbin/amqp_client`
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?
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
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 as I said in mu comment, please discuss this in our RabbitMQ forum linked above
@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 not that I know of, but you can start your own thread