Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-990

MQTT 3.1 subscribe not fails in silent mode when client is not allowed to subscribe the topic

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • JBoss A-MQ 6.2
    • JBoss A-MQ 6.1
    • mqtt

      We use Paho MQTT client to connect to the AMQ broker and we noticed a not compliant behavior of AMQ regarding the subscribe operation when a client connects using MQTT 3.1 and tries to subscribe a topic which is not allowed to subscribe.

      • 3.1 explicitly says that no error should be throws by the broker during subscription:
        "Note that if a server implementation does not authorize a SUBSCRIBE request to be made by a client, it has no way of informing that client. It must therefore make a positive acknowledgement with a SUBACK, and the client will not be informed that it was not authorized to subscribe."
        (http://public.dhe.ibm.com/software/dw/webservices/ws-mqtt/mqtt-v3r1.html#suback)
      • 3.1.1 specifies
        "The SUBACK Packet sent by the Server to the Client MUST contain a return code for each Topic Filter/QoS pair. This return code MUST either show the maximum QoS that was granted for that Subscription or indicate that the subscription failed”
        (http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718063)

      Paho client receives an MQTT exception (code 128, 0x80 hex) on both cases, but as stated in the specification this is the expected result for 3.1.1 version but not for 3.1 version (in this case should fail in silent mode).

              dejanbosanac Dejan Bosanac
              hkonsek Henryk Konsek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: