[rabbitmq-discuss] Reconnect logic for C library

Paul Dix paul at pauldix.net
Tue Apr 12 14:50:13 BST 2011

Hi Matthias,
I briefly tried to use these two:

amqp_tx_commit(connection, channel);

Then check the result. However, I found that it would indicate success
for a message or two after I took RabbitMQ down before it indicated a
problem. I ended up bailing on C, but I'd be interested to hear if
this is possible with the library. The two things are: fail if a
message doesn't get published (i.e. don't fail silently) and check
that a connection/channel is open.


On Tue, Apr 12, 2011 at 7:04 AM, Matthias Radestock
<matthias at rabbitmq.com> wrote:
> Paul,
> On 01/04/11 22:40, Paul Dix wrote:
>> I'm working with the rabbitmq c library and I need to have reconnect
>> logic in there. Basically, try to send a message, if it fails, attempt
>> reconnect and try again. How do I accomplish this? I've been using
>> amqp_basic_publish and if I try that it just hangs.
> Did you work out what the problem was? The people familiar with the C client
> at Rabbit HQ are a bit swamped at the moment, so it will likely be a while
> before we can look into this.
> Matthias.

More information about the rabbitmq-discuss mailing list