qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajith Attapattu <rajit...@gmail.com>
Subject Re: timeouts
Date Tue, 05 Jan 2010 19:30:41 GMT
Hello Jean,

It appears that you are using the C++ broker and the java client.
Could you confirm which version you are using?

On Tue, Jan 5, 2010 at 12:47 PM, Jen Andre <jandre@gmail.com> wrote:
>
> Hello,
>
> I have a Java client listener that subscribes to a topic and waits for
> messages.  I'm noticing after 120 seconds of idle time  (no messages
> received) the connections time out (here's what I see in syslog messages for
> qpidd)
>
> qpidd[3472]: 2010-01-01 16:46:20 error Connection timed out: closing
>
> This is consistent with the debug messages I'm seeing on the client side:
>
> IoReceiver - /192.168.10.128:5672 2010-01-05 12:32:10,126 WARN
> [apache.qpid.transport.ClientDelegate] Ignoring the idle timeout 0 set by
> the connection, using the brokers max value 120
>
> and
>
>
> IoReceiver - /192.168.10.128:5672 2010-01-05 12:38:57,898 DEBUG
> [apache.qpid.transport.Connection] RECV: [conn:9ced8e] ch=0
> ConnectionHeartbeat()
> IoReceiver - /192.168.10.128:5672 2010-01-05 12:40:57,899 DEBUG
> [apache.qpid.transport.Connection] RECV: [conn:9ced8e] ch=0
> ConnectionHeartbeat()
> IoReceiver - /192.168.10.128:5672 2010-01-05 12:40:58,618 DEBUG
> [apache.qpid.transport.Connection] connection closed: conn:9ced8e
>
>
> I'm a bit confused on how timeouts and heartbeats are supposed to work.
> Does the client force the disconnect, or the server, or both, if the
> heartbeats are not received in a specific period of time?
Both the client and the broker could enforce a disconnect if they
don't see any activity during two consecutive heartbeat intervals.

 Do both peers
> send heartbeats? (this seems to imply it does.
Both peers do send a heartbeat.
The JMS client (0-10 version which you are using against the c++
broker) will echo a heartbeat in response to one sent by the broker.

> http://qpid.apache.org/configure-broker-and-client-heartbeating.html).
The link you provided is for the JMS Client (0-8 version) and the Java Broker.
At the moment it's slightly different from JMS Client (0-10) and c++
broker combination.

The amqj.heartbeat.delay is only effective for the 0-8 codepath.
If you need to set the idle timeout for the 0-10 client you need to
set it in the broker URL as follows

amqp:///test?brokerlist='tcp://anotherhost:5684?idle_timeout='60''
Please note the idle_timeout is in secs and not in milisecs.

We are working on consolidating the configuration and behaviour of the
JMS client for both 0-8/9 and 0-10 versions.

> I do notice that while I see a lot of RECV: heartbeat debug messages on the
> client side, I don't see any SEND: messages that indicates it's sending them
> to server.   If the client is supposed to send them to the server
> periodically to ensure the connection stays alive, how can I ensure this is
> happening? (setting system property amqj.heartbeat.delay seems to have no
> effect).
>
> Thanks!
> Jen
>
>
>
>
>
> --
> View this message in context: http://n2.nabble.com/timeouts-tp4256406p4256406.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>



-- 
Regards,

Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/

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


Mime
View raw message