Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-5112

MQTT server connections are not thread safe

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.9.0
    • Fix Version/s: 5.10.0
    • Component/s: MQTT
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      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.

        Attachments

        1. AMQ-5112.patch
          10 kB
          Dhiraj Sureshkumar Bokde
        2. AMQ-5112.patch2
          3 kB
          Dhiraj Sureshkumar Bokde

          Activity

            People

            • Assignee:
              dejanb Dejan Bosanac
              Reporter:
              dhirajsb Dhiraj Sureshkumar Bokde
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: