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

ConsumeMQTT does not work in stateless flows

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.16.0, 1.15.1
    • Extensions

    Description

      When ConsumeMQTT is executed in stateless environment, the transferQueue() method gets into an endless loop (while (!mqttQueue.isEmpty())). At the end of each iteration of this loop

      session.commitAsync(() -> mqttQueue.remove(mqttMessage));

      is supposed to remove the message from the queue. but since the commit is async, the method is already processing the same message in the next iteration by the time it would execute. The session cannot commit so it does a rollback, and the message is never removed from the queue.

      The endless loop consumes all resources and NiFi needs to be restarted to break the loop.

      Attachments

        Issue Links

          Activity

            People

              pgyori Peter Gyori
              pgyori Peter Gyori
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 40m
                  40m