rabbitmq / rabbitmq-erlang-client

Erlang client for RabbitMQ

Home Page:https://www.rabbitmq.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Direct connections from outside of RabbitMQ will fail in stable

binarin opened this issue · comments

Direct connections work from within the broker itself, but any project which depends only on amqp_client is broken (like pma/amqp#73)

This happened because in rabbitmq/rabbitmq-common@81b5eab#diff-7159eb0974065867f293d7148ba5036aL1 rabbit_queue_collector module was removed from rabbit_common, but it's still being referenced here

{collector, {rabbit_queue_collector, start_link, [ConnName]},

@binarin thanks. Would you be interested in submitting a PR? I think the right thing to do here is to find a way for rabbitmq-common to not have a dependency on rabbit_queue_collector. Queue collector's original purpose was to clean up exclusive queues when certain events (well, their connection closure) happens.

No, I don't think that I'll have any free time soon.

For direct connections rabbit_queue_collector is running on the wrong side of connection - on client. So e.g. in case of network split between client and server it doesn't have a chance to perform a proper cleanup. But the cleanup is still performed due to some other links/monitors set-up during channel opening process. I think that it's better to make all this explicit and just start a collector and some sort of connection monitoring process on the server side.