Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-11270

Refactoring of the overly Paho-specific MQTT interface

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0-M1, 1.21.0
    • Extensions

    Description

      ConsumeMQTT processor implements the MqttClient interface, which follows the signature of the Paho library's MqttClient interface. There are two issues with that. It mixes two types of behavior because the client itself can act as a publisher and subscriber parallelly. However, in NiFi, these two roles are separated into different processors. So it doesn't make sense to implement the subscribe interface in PublishMQTT, and it also doesn't make sense to implement deliveryComplete in ConsumeMQTT.
      The other issue is that these interfaces cannot be used with the HiveMQ client except messageArrived(). Because of the above, we need to move the existing implementation into the Paho adapter (because it is still required for logging) and create a new interface for handling incoming messages.

      Attachments

        Issue Links

          Activity

            People

              sabonyi Nandor Soma Abonyi
              sabonyi Nandor Soma Abonyi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m