qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Heartbeats in C++ broker on Windows
Date Tue, 03 Jan 2012 10:42:00 GMT
On 12/22/2011 01:59 PM, wolfwolfswinkel wrote:
> Hi,
> I am using the 0.10 c++ broker and client libraries on windows and
> performing some experiments with the reconnect behaviour of the async sender
> in the c++ messaging client API. Specifically, I try to enable heartbeats on
> the connection, however until now without success.
> I set Connection options "reconnect" to "true" and "heartbeat" to 6, open
> the Connection, create a Session and a Sender, then send a few messages
> which are delivered as expected. Then I leave the connection idle for a
> while, the message "debug Traffic timeout" appears in the client's log after
> 12 seconds (probably twice the heartbeat interval). This seems to be the
> indication that the broker did not sent a heartbeat in time.
> Then I start sending messages using the Sender again. It appears the
> messages do not reach the broker. Inspection on the broker side shows the
> connection with the client still exists, but is idle. At some point the
> Sender reaches capacity and then waits indefinitely for capacity inside a
> blocking sync() call.
> It seems there are two issues here:
> 1. the broker does not send a heartbeat
> 2. when the client detects the missing heartbeat, it gets in a state where
> it cannot deliver messages to the broker. No exceptions are thrown, no
> indications in the log that the connection is lost or of reconnection
> attempts
> Regarding the first issue:
> If I turn on tracing on the broker side, I get:
> 2011-12-22 11:49:52 trace SENT []:
> Frame[BEbe; channel=0; {ConnectionTuneBody: channel-max=32767;
> max-frame-size=65535; heartbeat-min=0; heartbeat-max=0; }]
> 2011-12-22 11:49:52 trace RECV []:
> Frame[BEbe; channel=0; {ConnectionTuneOkBody: channel-max=32767;
> max-frame-size=65535; heartbeat=0; }]
> I am not familiar with the protocol at this level, but I suspect this is the
> broker telling the client its min/max supported heartbeat intervals (both
> 0), and then the client agreeing to use heartbeat interval 0.
> Does anyone recognize these issues? Does the C++ broker on windows support
> heartbeats at all?

I think this is an issue with the c++ broker on windows where it is 
incorrectly communicating the acceptable limits (thus causing the client 
to believe heartbeats are not supported).

Unfortunately the sending of the tune control, in which the heartbeat 
limits are conveyed, is triggered from the authentication logic which 
differs between the platforms even though the heartbeat implementation 
does not.

The attached patch should fix this.

View raw message