Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E26D9200B35 for ; Tue, 5 Jul 2016 20:18:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E1245160A70; Tue, 5 Jul 2016 18:18:12 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 19007160A2C for ; Tue, 5 Jul 2016 20:18:11 +0200 (CEST) Received: (qmail 53541 invoked by uid 500); 5 Jul 2016 18:18:11 -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 53529 invoked by uid 99); 5 Jul 2016 18:18:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jul 2016 18:18:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 222B12C027F for ; Tue, 5 Jul 2016 18:18:11 +0000 (UTC) Date: Tue, 5 Jul 2016 18:18:11 +0000 (UTC) From: "Christopher L. Shannon (JIRA)" To: issues@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (AMQ-6343) [MQTT] LWT doesn't work over a websocket connection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 05 Jul 2016 18:18:13 -0000 [ https://issues.apache.org/jira/browse/AMQ-6343?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Christopher L. Shannon resolved AMQ-6343. ----------------------------------------- Resolution: Fixed Fix Version/s: 5.13.4 5.14.0 This should be fixed. The LWT message will be sent if on websocket close a= disconnect packet was never received. > [MQTT] LWT doesn't work over a websocket connection > --------------------------------------------------- > > Key: AMQ-6343 > URL: https://issues.apache.org/jira/browse/AMQ-6343 > Project: ActiveMQ > Issue Type: Bug > Affects Versions: 5.13.3 > Environment: GNU/Linux Debian 8.3 > Reporter: Sylvain Maucourt > Assignee: Christopher L. Shannon > Fix For: 5.14.0, 5.13.4 > > > I use several services, some of them connect over tcp and the LWT works p= roperly. > I use several clients from a webapp' connected over a websocket link. > i use a javascript code: > {code:javascript} > var i_am_disconnected =3D new Paho.MQTT.Message(JSON.stringify({ > version: 1, > state: 0 > })); > i_am_disconnected.destinationName =3D "device/" + _token + "/ping"; > i_am_disconnected.retained =3D true; > i_am_disconnected.qos =3D 1; > client.onConnectionLost =3D onConnectionLost; > client.connect(=E2=80=A6 > {code} > i traced the ActiveMQ log, i can see that the disconnection is detected, = but i didn't receive my LWT message. (again, my LWT works when I use a tcp = connexion) > {code} > 2016-07-01 00:07:51,329 | INFO | addConnection() clientId: 60badfb1-3e6d= -4637-b4ec-16b557d7db64 userName: bd525936-5238-4410-9579-79f8dfb27ea4::60b= adfb1-3e6d-4637-b4ec-16b557d7db64 info: ConnectionInfo {commandId =3D 0, re= sponseRequired =3D true, connectionId =3D ID:deverylight-all-snapshot-42229= -1467323807294-3:27, clientId =3D 60badfb1-3e6d-4637-b4ec-16b557d7db64, cli= entIp =3D ws://192.168.0.2:42372, userName =3D bd525936-5238-4410-9579-79f8= dfb27ea4::60badfb1-3e6d-4637-b4ec-16b557d7db64, password =3D *****, brokerP= ath =3D null, brokerMasterConnector =3D false, manageable =3D false, client= Master =3D true, faultTolerant =3D false, failoverReconnect =3D false} | co= m.deveryware.deverylight.activemq.TokenAuthenticationBroker | qtp1143988572= -40 > 2016-07-01 00:07:51,333 | INFO | addProducer() clientId: 60badfb1-3e6d-4= 637-b4ec-16b557d7db64 userName: bd525936-5238-4410-9579-79f8dfb27ea4::60bad= fb1-3e6d-4637-b4ec-16b557d7db64 info: ProducerInfo {commandId =3D 2, respon= seRequired =3D true, producerId =3D ID:deverylight-all-snapshot-42229-14673= 23807294-3:27:-1:1, destination =3D null, brokerPath =3D null, dispatchAsyn= c =3D false, windowSize =3D 0, sentCount =3D 0} | com.deveryware.deveryligh= t.activemq.TokenAuthenticationBroker | qtp1143988572-40 > 2016-07-01 00:07:51,423 | INFO | send() clientId: 60badfb1-3e6d-4637-b4e= c-16b557d7db64 userName: bd525936-5238-4410-9579-79f8dfb27ea4::60badfb1-3e6= d-4637-b4ec-16b557d7db64 send: ActiveMQBytesMessage {commandId =3D 3, respo= nseRequired =3D true, messageId =3D ID:deverylight-all-snapshot-42229-14673= 23807294-3:27:-1:1:1, originalDestination =3D null, originalTransactionId = =3D null, producerId =3D ID:deverylight-all-snapshot-42229-1467323807294-3:= 27:-1:1, destination =3D topic://device.bd525936-5238-4410-9579-79f8dfb27ea= 4::60badfb1-3e6d-4637-b4ec-16b557d7db64.ping, transactionId =3D null, expir= ation =3D 0, timestamp =3D 1467324471422, arrival =3D 0, brokerInTime =3D 0= , brokerOutTime =3D 0, correlationId =3D null, replyTo =3D null, persistent= =3D false, type =3D null, priority =3D 4, groupID =3D null, groupSequence = =3D 0, targetConsumerId =3D null, compressed =3D false, userID =3D null, co= ntent =3D org.apache.activemq.util.ByteSequence@335bf90b, marshalledPropert= ies =3D null, dataStructure =3D null, redeliveryCounter =3D 0, size =3D 0, = properties =3D {ActiveMQ.MQTT.QoS=3D1, ActiveMQ.Retain=3Dtrue}, readOnlyPro= perties =3D true, readOnlyBody =3D true, droppable =3D false, jmsXGroupFirs= tForConsumer =3D false} ActiveMQBytesMessage{ bytesOut =3D null, dataOut = =3D null, dataIn =3D null } payload: {"version":1,"state":2,"timestamp":146= 7324470.015} | com.deveryware.deverylight.activemq.TokenAuthenticationBroke= r | qtp1143988572-41 > 2016-07-01 00:07:51,447 | INFO | addConsumer() clientId: 60badfb1-3e6d-4= 637-b4ec-16b557d7db64 userName: bd525936-5238-4410-9579-79f8dfb27ea4::60bad= fb1-3e6d-4637-b4ec-16b557d7db64 info: ConsumerInfo {commandId =3D 4, respon= seRequired =3D true, consumerId =3D ID:deverylight-all-snapshot-42229-14673= 23807294-3:27:-1:1, destination =3D topic://mobile.167e0de6e20b55cc318aacb7= 4f31752e2bffd339.*.position, prefetchSize =3D 32767, maximumPendingMessageL= imit =3D 0, browser =3D false, dispatchAsync =3D true, selector =3D null, c= lientId =3D null, subscriptionName =3D null, noLocal =3D false, exclusive = =3D false, retroactive =3D true, priority =3D 0, brokerPath =3D null, optim= izedAcknowledge =3D false, noRangeAcks =3D false, additionalPredicate =3D n= ull} | com.deveryware.deverylight.activemq.TokenAuthenticationBroker | qtp1= 143988572-39 > 2016-07-01 00:07:51,451 | INFO | addConsumer() clientId: 60badfb1-3e6d-4= 637-b4ec-16b557d7db64 userName: bd525936-5238-4410-9579-79f8dfb27ea4::60bad= fb1-3e6d-4637-b4ec-16b557d7db64 info: ConsumerInfo {commandId =3D 5, respon= seRequired =3D true, consumerId =3D ID:deverylight-all-snapshot-42229-14673= 23807294-3:27:-1:2, destination =3D topic://mobile.167e0de6e20b55cc318aacb7= 4f31752e2bffd339.*.event, prefetchSize =3D 32767, maximumPendingMessageLimi= t =3D 0, browser =3D false, dispatchAsync =3D true, selector =3D null, clie= ntId =3D null, subscriptionName =3D null, noLocal =3D false, exclusive =3D = false, retroactive =3D true, priority =3D 0, brokerPath =3D null, optimized= Acknowledge =3D false, noRangeAcks =3D false, additionalPredicate =3D null}= | com.deveryware.deverylight.activemq.TokenAuthenticationBroker | qtp11439= 88572-39 > 2016-07-01 00:08:51,151 | INFO | removeConnection() clientId: 60badfb1-3= e6d-4637-b4ec-16b557d7db64 userName: bd525936-5238-4410-9579-79f8dfb27ea4::= 60badfb1-3e6d-4637-b4ec-16b557d7db64 info: ConnectionInfo {commandId =3D 0,= responseRequired =3D true, connectionId =3D ID:deverylight-all-snapshot-42= 229-1467323807294-3:27, clientId =3D 60badfb1-3e6d-4637-b4ec-16b557d7db64, = clientIp =3D ws://192.168.0.2:42372, userName =3D bd525936-5238-4410-9579-7= 9f8dfb27ea4::60badfb1-3e6d-4637-b4ec-16b557d7db64, password =3D *****, brok= erPath =3D null, brokerMasterConnector =3D false, manageable =3D false, cli= entMaster =3D true, faultTolerant =3D false, failoverReconnect =3D false} |= com.deveryware.deverylight.activemq.TokenAuthenticationBroker | qtp1143988= 572-40 > {code} > this is my ActiveMQ configuration > {code} > > > > > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)