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

MQTT Unsubscribe does not work as intended in network of brokers scenario

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Abandoned
    • 5.11.0
    • None
    • MQTT

    Description

      I’m trying to make sure that if an unsubscribe() is done for an existing durable topic in any of the brokers, it takes effect in all the brokers (I.e) no further messages published to that topic (in any of the brokers) should be received by the client that unsubscribed (when it connects at a later time after publish).

      I’ve explained my test cases below and also I’ve attached my test code. The test numbers (from the list below) that are failing are 2, 4, 6, 7, 8, 9.

      /*

      • Test if unsubscribe() works as intended in a network of brokers (two) scenario
      • Setup:
      • Broker1 and Broker2 are networked.
      • Broker1(B1) <-----> Broker2(B2)
      • B1 is running MQTT transport on 1883 and B2 on 2883 on the same machine. They have a duplex network connector between them. The MQTT transport connector uses the transport.subscriptionStrategy option as shown below:
        <transportConnector name="mqtt"uri="mqtt://0.0.0.0:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600&transport.subscriptionStrategy=mqtt-virtual-topic-subscriptions”/
      • General flow:
      • 1. Clear any previous durable subs in B1 and B2 (use clean_session = true)
      • 2. Create durable subscription by connecting to B1
      • 3. Publish message in B1
      • 4. Confirm that the durable subscription was created by connecting to B1 and receiving the message
      • 5. Unsubscribe in B1 or B2 or both
      • 6. Publish message in B1 or B2 or both
      • 7. Connect to B1 (and B2) and make sure message is NOT received
      • In steps 5 (Unsub) and 6 (Pub), we can perform the steps in B1 or B2 or both. This gives rise to the following test cases
      • UnsubB1 UnsubB2 PubB1 PubB2
      • -----------------------------------------------------
      • 1. false true false true
      • 2. true false false true
      • 3. true true false true
      • 4. false true true false
      • 5. true false true false
      • 6. true true true false
      • 7. false true true true
      • 8. true false true true
      • 9. true true true true
        */

      Attachments

        Activity

          People

            Unassigned Unassigned
            workanandr AR
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: