I need to read messages from IBM MQ and terminate the loop as soon all the messages are consumed. Pls help!!
This can be done using the Run Assertions for Each Item Assertion branch (Run Assertions for Each Item Assertion - CA API Gateway - 9.3 - CA Technologies Documentation ), Route via MQ Native, and the Scheduling Functionality of the gateway (Manage Scheduled Tasks - CA API Gateway - 9.3 - CA Technologies Documentation ). I've attached a sample policy that will check the IBM MQ queue 10 times and if one time comes back with no response it will break the cycle. The number of iterations can be controlled by the msgs variable and I would suggest that you keep the number below 50 depending on how often you go back to review the queue.