[rabbitmq-discuss] Consumer connection closes abruptly after one message

Michael Klishin michael.s.klishin at gmail.com
Wed Nov 16 15:52:54 GMT 2011


2011/11/16 p2w <tpletch001 at gmail.com>

> I'm sure I'm doing something wrong in the initializer but can't figure
> out what as its really pretty vanilla. Any help greatly appreciated...
>

I apologize for not noticing that you are using Thin. One thing that may
cause abrupt TCP connection termination is uncaught exception on the
EventMachine
thread (in this case, your applications' main thread). In some cases it may
be swallowed by
various "helpful" libraries. Can you try removing more and more
code from your consumer handlers to see at what point connection becomes
stable?

Also, with at least a couple of most recent point amqp gem releases you can
simplify your initializer
a little bit by renaming config file to amqp.yml and using
AMQP::Integration::Rails:

https://gist.github.com/3d995824090df94558b0

Sorry that it is undocumented yet.
-- 
MK

http://github.com/michaelklishin
http://twitter.com/michaelklishin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20111116/16aa403b/attachment.htm>


More information about the rabbitmq-discuss mailing list