qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajith Attapattu (JIRA)" <qpid-...@incubator.apache.org>
Subject [jira] Commented: (QPID-2800) Add configurable timeout on Connection object for 0-10 codepath
Date Wed, 08 Sep 2010 22:53:33 GMT

    [ https://issues.apache.org/jira/browse/QPID-2800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907472#action_12907472

Rajith Attapattu commented on QPID-2800:

The above patch is wrong as it,
a) Does not set the actual the idle_timeout (as it gets overwritten later on).
b) It's not the way it should be configured
c) There is already a way to configure this value.

The problem here is poor documentation and the terrible state our code is in. 
I am actually planning to add documentation to list all the configurable properties in the
Also I have tried to stick to a proper naming convention for the properties and I we decided
to use qpid.propertyname instead of 'amqj.propertyname'.
I have done some partial work in handling the config props in a consistent way and also to
move all properties to the new naming convention with support for backwards compatibility.

Here is how the idle timeout is handled in the 0-10 code path.

How it is used
(*) The idle_timeout field in Connection.java is calculated as twice the value of the negotiated
heartbeat value with the broker. 

(*) So the right thing to configure is the heartbeat not the idle_timeout. 

(*) The idle_timeout is computed (using the heartbeat value) during ConnectionTune. Once set
it will be used to set the so-timeout in the underlying socket to get a read timeout if we
don't see anything on the pipe for two consecutive heartbeat intervals.

(*) Please see the ConnectionTune method in ClientDelegate.java to see how the heartbeat value
is chosen.

Heartbeat Configuration
(*) You could set a default timeout using -Didle_timeout (deprecated) or -Dqpid.heartbeat

(*) You could also set a connection specific timeout using 'idle_timeout' (deprecated) or

(*) The idle_timeout is in mili seconds and the heartbeat is in seconds.

(*) The idle_timeout created a lot of confusion. First of all it was the wrong name and then
it was using miliseconds instead of secs which was the unit the connection tune amqp method
was using.
      Therefore this is deprecated and a message is printed each time this is used.

(*) Please see getHeartbeatInterval method in AMQConnectionDelegate_0_10 to see how the heartbeat
value is read from configuration. 

> Add configurable timeout on Connection object for 0-10 codepath
> ---------------------------------------------------------------
>                 Key: QPID-2800
>                 URL: https://issues.apache.org/jira/browse/QPID-2800
>             Project: Qpid
>          Issue Type: Improvement
>          Components: Java Broker, Java Client
>    Affects Versions: 0.7
>            Reporter: Sorin Suciu
>            Assignee: Robbie Gemmell
>             Fix For: 0.7
>         Attachments: qpid-2800.patch
> Currently the o.a.q.transport.Connection class has a hardcoded timeout long set to 60
seconds. This is used both on connection open/close operations, we could probably use a system
property to configure this value should we need to change it. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message