[rabbitmq-discuss] Rabbit Client Supervision Architecture
erikseres at exosite.com
Wed Sep 22 08:42:46 BST 2010
I have a few questions regarding the RabbitMQ Erlang client library...
1) The client now has layers of supervision built in. Apparently, however, the
maximum restart count for the various supervisors is set to 0. This will prevent
the supervisor from trying to restart its children in case of a crash. I have
verified this to be the case by the following:
- created a network type connection to the server,
- opened 2 channels within that connection,
- sent a non-normal exit signal to the newly opened channel process.
The channel process crashed, its supervisor propagated the exit signal to the
other channel and finally, it shut down itself, too. The client has never
started back up again.
Question: What would be the intended use case of a supervisor with MaxRetryCount
set to 0?
2) There is a channels manager process sitting at the same level in the
supervision tree as the supervisor that supervises the supervisors of the
channels (and writer and framing channel). The channels manager process does not
have any links to the channels it apparently is to manage.
Question: What is the intended purpose of the channels manager?
3) I am trying to figure out how the four layers of supervision is supposed to
work and can't really wrap my head around it. The way I conceive it should work
is something like this, from top down:
- Layer 1: supervise the entire client library
- Layer 2: one_for_all supervision per connection. That is, when the
connection, main reader or writer dies, shutdown all channels within that
connection, restart the connection and all previously open channels.
- Layer 3: one_for_one supervision per channel. That is, when a channel dies,
restart the channel only and not affect anything else.
Question: Is this the intended behavior or am I on the wrong track?
More information about the rabbitmq-discuss