API Connect

 View Only
  • 1.  Can we achieve number of retries to the backend mechanism in api connect?

    Posted 17 days ago

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


  • 2.  RE: Can we achieve number of retries to the backend mechanism in api connect?

    Posted 15 days ago

    Hi Kumar,
    By "DataPower" I assume you're discussing services such as a Multi-Protocol Gateway that has a request and response rule where the end of the request rule could have a results action with some number of retries to attempt to connect to the backend routing url.  In API Connect, there is no response rule, just the assembly which would have one main rule, the end of which the response is sent to the originating client.  To get to a backend that would require the use of the invoke policy, but there is no connection retry/connection retry interval properties on this policy.  That would require a request for enhancement.
    Regards,
    Steve



    ------------------------------
    Steve Linn
    Senior Consulting I/T Specialist
    IBM
    ------------------------------



  • 3.  RE: Can we achieve number of retries to the backend mechanism in api connect?

    Posted 13 days ago

    In API Connect, you can implement retries when calling a backend service by configuring retry policies within the API assembly. These policies define the number of retries, retry interval, and other parameters. Error handling mechanisms catch errors from the backend, triggering the retry policy accordingly. Conditional flows control when the retry policy applies, allowing customization based on error types or conditions. Logging and monitoring provide visibility into the success and failure of requests, aiding in analyzing and optimizing the retry strategy. Overall, API Connect offers the flexibility to achieve similar retry functionality as in DataPower, enhancing the reliability of API calls to backend services.



    ------------------------------
    ben jacky
    ------------------------------



  • 4.  RE: Can we achieve number of retries to the backend mechanism in api connect?

    Posted 12 days ago

    Hi,

    Could you please tell where to find Retry Policy in API Assembly? I tried looking for it but couldn't locate. APIC Version: 10.0.5.6

    Thanks



    ------------------------------
    Uvaise Odam
    ------------------------------



  • 5.  RE: Can we achieve number of retries to the backend mechanism in api connect?

    Posted 12 days ago

    See my reply on this page.



    ------------------------------
    Nick Cawood
    API Connect Consultant
    IBM Hybrid Cloud Integration Expert Labs
    IBM UK Ltd

    https://www.linkedin.com/in/nickcawood/
    ------------------------------



  • 6.  RE: Can we achieve number of retries to the backend mechanism in api connect?

    Posted 12 days ago
    Edited by Nick Cawood 12 days ago

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



  • 7.  RE: Can we achieve number of retries to the backend mechanism in api connect?

    Posted 11 days ago

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