I am writing a code to clear all the messages in the queue. I am using a Compute and GET node for the purpose. I want to loop through the messages while clearing each message and want the loop to stop when the queue is empty.
Please give me some suggestions for achieving this
The MQGet node has a no message output terminal, where the process routes in case there was no message on the queue.
So you could achieve your goal by connecting the Out terminal of the MQGet to the In terminal of your Compute node, and the No Message terminal of the MQGet to nothing or some other Compute if you want to do something more after getting all the messages.