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
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.