[rabbitmq-discuss] Rabbit Client Supervision Architecture

Matthew Sackman matthew at rabbitmq.com
Wed Sep 22 15:48:10 BST 2010


On Wed, Sep 22, 2010 at 02:43:16PM +0000, Erik Seres wrote:
> What stops me from being able to add the 
> connection process to my supervisor child list? The process seems to be a 
> gen_server so it should be ok to do that, right? Or, is it not possible because 
> it is already on another supervisor's child list?

A supervisor has to _start_ the process (the MFA invoked by the sup must
do return the pid of the child and must be linked to the child). If you
did a child spec which as the MFA did:

{ok, Pid} = amqp_connection:start(network, Params),
link(Pid),
{ok, Pid}

then I think that would work. The child spec would need to indicate the
child is a worker. It might then show up. I think. I might be wrong
though - I've never tried having a child supervised by two parents -
sounds a bit like incest to me.

Matthew


More information about the rabbitmq-discuss mailing list