Return-Path: X-Original-To: apmail-activemq-issues-archive@minotaur.apache.org Delivered-To: apmail-activemq-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6B67F193CF for ; Fri, 29 Apr 2016 15:49:13 +0000 (UTC) Received: (qmail 91001 invoked by uid 500); 29 Apr 2016 15:49:13 -0000 Delivered-To: apmail-activemq-issues-archive@activemq.apache.org Received: (qmail 90967 invoked by uid 500); 29 Apr 2016 15:49:13 -0000 Mailing-List: contact issues-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list issues@activemq.apache.org Received: (qmail 90931 invoked by uid 99); 29 Apr 2016 15:49:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Apr 2016 15:49:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 00CCB2C1F5D for ; Fri, 29 Apr 2016 15:49:13 +0000 (UTC) Date: Fri, 29 Apr 2016 15:49:13 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ARTEMIS-397) MQTT protocol - connection TTL = keepAliveTimeSeconds * 750 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ARTEMIS-397?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D152= 64223#comment-15264223 ]=20 ASF GitHub Bot commented on ARTEMIS-397: ---------------------------------------- GitHub user incarosegit opened a pull request: https://github.com/apache/activemq-artemis/pull/497 Change keep alive ratio to 1.5 from 0.75 Fixes: ARTEMIS-397 =20 From mqtt specs: =20 =E2=80=9CIf the Keep Alive value is non-zero and the Server does not re= ceive a Control Packet from the Client within one and a half times the Keep Alive time period, it MUST disconnect the Network Connection to the Client as if the network had failed [MQTT-3.1.2-24]. =E2=80=9C You can merge this pull request into a Git repository by running: $ git pull https://github.com/incarosegit/activemq-artemis master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/activemq-artemis/pull/497.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #497 =20 ---- commit 6bdad3db2a8e19069f7d1d5b44c97ceb0fc05b92 Author: Diego Bes Date: 2016-04-29T15:43:25Z Change keep alive ratio to 1.5 from 0.75 =20 Fixes: ARTEMIS-397 =20 From mqtt specs: =20 =E2=80=9CIf the Keep Alive value is non-zero and the Server does not re= ceive a Control Packet from the Client within one and a half times the Keep Alive time period, it MUST disconnect the Network Connection to the Client as if the network had failed [MQTT-3.1.2-24]. =E2=80=9C ---- > MQTT protocol - connection TTL =3D keepAliveTimeSeconds * 750 > ----------------------------------------------------------- > > Key: ARTEMIS-397 > URL: https://issues.apache.org/jira/browse/ARTEMIS-397 > Project: ActiveMQ Artemis > Issue Type: Bug > Components: Broker > Affects Versions: 1.0.0, 1.1.0, 1.2.0 > Reporter: hiawui > > For MQTT protocol, the connection TTL is equal to keepAliveTimeSeconds * = 750, causes connections always disconnected by timeout. Is it a bug? or why= ? > {code:title=3DMQTTProtocolHandler.java:159|borderStyle=3Dsolid} > void handleConnect(MqttConnectMessage connect, ChannelHandlerContext c= tx) throws Exception { > this.ctx =3D ctx; > connectionEntry.ttl =3D connect.variableHeader().keepAliveTimeSecon= ds() * 750; // this line!!!, why not multiply by larger than 1000? > String clientId =3D connect.payload().clientIdentifier(); > session.getConnectionManager().connect(clientId, connect.payload().= userName(), connect.payload().password(), connect.variableHeader().isWillFl= ag(), connect.payload().willMessage(), connect.payload().willTopic(), conne= ct.variableHeader().isWillRetain(), connect.variableHeader().willQos(), con= nect.variableHeader().isCleanSession()); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)