Layer7 API Management

  • 1.  How we can set a while loop in CA API Gateway? 

    Posted Mar 27, 2018 09:23 AM

    I need to read messages from IBM MQ and terminate the loop as soon all the messages are consumed. Pls help!!



  • 2.  Re: How we can set a while loop in CA API Gateway? 

    Broadcom Employee
    Posted Jan 22, 2019 04:30 PM
      |   view attached

    Good afternoon,

     

    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.

     

    Sincerely,

     

    Stephen Hughes

    Broadcom Support

    Attachment(s)

    zip
    while_loop_policy.xml.zip   1 KB 1 version