[rabbitmq-discuss] Changes to Erlang client for bug22056

Matthew Sackman matthew at lshift.net
Thu Mar 11 10:34:27 GMT 2010

On Wed, Mar 10, 2010 at 06:41:24PM -0600, Garrett Smith wrote:
> 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())

Err yes. That's my fault. It was originally :subscribe, then I objected
but the consume version was actually less flexible and still didn't
really solve all of my objections. Thus it went back to :subscribe.

> 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

In both cases, the links well ensure that the connection gets torn down.
Thus if you create the connection with start_network_link or
start_direct_link then you'll also be torn down (or at least receive an
'EXIT' signal/message).


More information about the rabbitmq-discuss mailing list