Hi Junior,
You have the ability to configure the retry option and count when creating
the endpoint. Please refer the below sample configuration,

<endpoint xmlns="http://ws.apache.org/ns/synapse"; name="sample">
>    <address uri="http://localhost:8080/sample/echo";>
>       <suspendOnFailure>
>          <progressionFactor>1.0</progressionFactor>
>       </suspendOnFailure>
>       <markForSuspension>
>          <retriesBeforeSuspension>5</retriesBeforeSuspension>
>          <retryDelay>600</retryDelay>
>       </markForSuspension>
>       <timeout>
>          <duration>10000</duration>
>          <responseAction>fault</responseAction>
>       </timeout>
>    </address>
> </endpoint>


The above configuration is enabling the endpoint to be retried 5 times with
a timeout.

You can create a replay of the messages to the endpoint with more control
by following the store forward integration pattern. Please refer to the
documentation [1] for more information.

[1]
https://docs.wso2.com/display/ESB480/Store+and+Forward+Using+JMS+Message+Stores

Thanks and Best Regards,

On Mon, Oct 8, 2018 at 2:14 AM Júnior <[email protected]> wrote:

> Hi,
>
> I would like to know if there is a way of retrying an endpoint
> automatically in WSO2 ESB.
>
> As I could see one way of doing that is using the failover mediator with
> some leaf endpoints.
>
> I would like to a scenario like this:
>
> Try the endpoint and in case of a timeout, try it another two times and
> after a third try it would lead to a fault sequence. Using the failover
> mediator, it will work only if we enable the suspension of the endpoint.
> I would like to have it without adding suspension settings. As I could
> see, without the suspension settings, the failover endpoint will try the
> request forever until the endpoints respond correctly.
>
> Is there any way to achieve this scenario?
>
> My first idea, in case there is no OOTB solution, would be:
>
> 1. create a sequence that would have the call/send mediator. This
> sequence, would have a onError sequence, so in case of a timeout, we would
> have a condition for a retry;
> 2. In case of timeout, the onError would be called, and we would have a
> counter, in case the counter is less than 3, we would call the previous
> sequence, else, it would fault.
>
> Would this be a correct approach for this scenario?
>
> Thanks,
> --
> Francisco Ribeiro
> *SCEA|SCJP|SCWCD|IBM Certified SOA Associate*
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>


-- 

*Kamidu Sachith Punchihewa *| Senior Software Engineer | *WSO2 Inc*.
(m) +94770566749 / +254778872783 | (e) [email protected] | (ln) kamidu
<https://www.linkedin.com/in/kamidu/>

<https://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to