qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: 0.5 C++ example listener hangs during testing
Date Tue, 28 Jul 2009 17:24:47 GMT
lroloson wrote:
> I have the 0.5 broker and direct_producer running on Linux, and I have the
> 0.5 C++ direct listener example code running in Windows. I have transferred
> tons of messages, and all seems to be working fine under normal conditions.
> I am using persistent queues and messages - all work very well. I am now
> testing abnormal conditions, like network failure and recovery. When the
> network is disconnected on the Linux end,  the producer continues to
> generate the transactions and they are queued as expected. However, the
> listener  is not recovering when the cable is plugged back in on the Linux
> end, sometimes it does, and sometimes it does not. qpid-tool shows the
> messages and none are lost. I don't see an error on the listener side when
> it hangs, it appears to be waiting, but it never receives any more messages
> until I restart it. 
> How do I get the listener to reconnect when it gets in the above described
> state? 

Try enabling heartbeats (you can set that on an instance of 
ConnectionSettings that you then pass in to the Connection::open() call).

That will cause the client to abort the connection if it misses two 
heartbeats from the server. You can then try to reconnect.

Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org

View raw message