[rabbitmq-discuss] Changes to Erlang client for bug22056

Garrett Smith g at rre.tt
Thu Mar 11 00:41:24 GMT 2010


I noticed that to consume from a queue in the Erlang client, code that
once looked like this:

  amqp_channel:call(Channel, #'basic.consume'{queue = Q})

now is spelled:

 amqp_channel:subscribe(Channel, #'basic.consume'{queue = Q}, self())

I'm currently working through the correct link/monitor strategy in
Erlang to handle a couple of obvious points of failure:

- The AMQP connection fails, causing problems for any
producer/consumer processes
- A channel reader or writer crashes, leaving the channel or
connection in a possibly funky state

My Pavlovian/Erlang approach is to use links and/or monitors in Erlang
to crash any dependencies and let supervisors restart the lot.

This change looks like it may introduce logic for handling such
conditions. Being very lazy, I was hoping someone could elaborate on
what motivated the change (I don't think I have access to bug reports)
and, if convenient, provide guidance on implementing a sound restart
scheme for these types of failures.

Thanks!
Garrett




More information about the rabbitmq-discuss mailing list