Broken pipe after rabbitmq restart not detected immediately

120 views
Skip to first unread message

Job

unread,
Aug 18, 2011, 7:29:42 AM8/18/11
to carrot-users
>> Cross-post... hmm, I "accidentally" created a Kombu issue at github about this post, sorry about that.
>> I suppose the issue can be removed unless it actually is a bug in kombu.

Hello!
I'm using kombu 1.2.1 and amqplib1.0 and python 2.6.1 and rabbitmq
2.5.1.

After a restart of rabbitmq (single node setup) the first call to
producer.publish silently returns without transmitting the message. On
the second call, I get a "broken pipe" exception, and I recreate the
connection and everything works fine.

Why don't I get a broken pipe on the first call?
Is this a problem with amqlib or with kombu?
I've tried to use the ensure* methods on connection, but no luck. It
seems that kombu/amqlib don't understand that the socket is dead.

Thanks / J

Job

unread,
Aug 19, 2011, 10:19:26 AM8/19/11
to carrot-users
Hmm, I switched to use pika as transport, and now the consumer
connection is not recognizing the broke connection...
I'm using connection.drain_events(), which actually returns with an
error when RabbitMQ is restarted if I use py-amqplib.
Is there a parameter or similar I have to set when creating the
connection for it to recognize the restart?

Thanks / J
Reply all
Reply to author
Forward
0 new messages