Hi Kumar and Nick,
I agree with Nick that there is nothing in the invoke policy itself to handle retries. For sure having no stop on error in the invoke and having multiple imbedded switches will give you the multiple retry capability at the expense of additional assembly configuration and duplication of policies, but this approach does seem to be a cumbersome approach to me which is why I suggested in my previous post that a request for enhancement to the invoke policy be submitted. No promises of course if or when this RFE would be considered, but it would seem to me to be a much better user experience to configure the invoke policy once with the retry count and interval as part of the invoke policy. Another workaround of course would be to proxy the invoke backend by creating a MPGW that would do the actual interaction with the backend on behalf of the API Connect invoke action where that MPGW would specify the results action with the retry count and interval. This would keep the API as having just the one invoke policy for this backend, making the assembly cleaner in my opinion.
Regards,
Steve
------------------------------
Steve Linn
Senior Consulting I/T Specialist
IBM
------------------------------
Original Message:
Sent: Tue April 30, 2024 04:24 AM
From: Nick Cawood
Subject: Can we achieve number of retries to the backend mechanism in api connect?
Hi,
API Connect allows developers to build API flows using the Assembly/Policies tool in the Develop section of API Manager.
Calling backend services from APIs built in API Manager is managed via an "Invoke" policy.
Whilst the "Invoke" policy does not include a retries option OOTB, logic within the Assembly/Policies tool allows developers to add nested "Invoke" policies using "Switch" policies to essentially repeat an "Invoke" to the backend service based on the status code from the preceding Invoke.
If 3 retries is suggested then 3 nested "Invoke" policies can replicate this functionality within the API flow.
------------------------------
Nick Cawood
API Connect Consultant
IBM Hybrid Cloud Integration Expert Labs
IBM UK Ltd
https://www.linkedin.com/in/nickcawood/
Original Message:
Sent: Thu April 25, 2024 08:18 AM
From: Kumar .
Subject: Can we achieve number of retries to the backend mechanism in api connect?
Hello All,
In DataPower, by configuring the result action, we can determine the number of retries to the destination. Can we achieve something like that in API Connect while calling the backend?
Please help me with your Inputs.
------------------------------
Kumar
------------------------------