You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Dejan Bosanac (JIRA)" <ji...@apache.org> on 2014/03/20 11:34:43 UTC

[jira] [Resolved] (AMQ-5112) MQTT server connections are not thread safe

     [ https://issues.apache.org/jira/browse/AMQ-5112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dejan Bosanac resolved AMQ-5112.
--------------------------------

    Resolution: Fixed

Patch applied with

http://git-wip-us.apache.org/repos/asf/activemq/commit/4ba4aa21

Although I still see testResendMessageId failing regularly

Failed tests:
  MQTTSSLTest>MQTTTest.testResendMessageId:717 null
  MQTTTest.testResendMessageId:720 null

> MQTT server connections are not thread safe
> -------------------------------------------
>
>                 Key: AMQ-5112
>                 URL: https://issues.apache.org/jira/browse/AMQ-5112
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: MQTT
>    Affects Versions: 5.9.0
>            Reporter: Dhiraj Bokde
>            Assignee: Dejan Bosanac
>            Priority: Blocker
>             Fix For: 5.10.0
>
>         Attachments: AMQ-5112.patch
>
>
> MQTTProtocolConverter uses MQTTTransportFilter.sendToMQTT() to send packets to clients. However, there is a race condition where the converter is sending SUBACK or other acks to clients when ActiveMQ messages from the Broker also try to call sendToMQTT() to send PUBLISH packets to the same client. 
> A patch is included which fixes this by synchronizing the call to the underlying transport buffer in MQTTTransportFilter.sendToMQTT(). This also resolves another issue AMQ-4712, where some tests would intermittently fail due to this race condition. Those tests were marked as ignored, so this patch enables them again. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)