shri kant
shri kant

Reputation: 105

Stop Retry in WSO2 ESB Endpoint

I have used below endpoint property and want it to stop retry hit but still it is retrying. I want only one hit to endpoint whether it is success or failure.

<endpoint name="DecisionGatewayProxy_EPR">
    <address uri="http://XXXX:8280/soap/XXXX">
        <timeout>
            <duration>20000</duration>
            <responseAction>fault</responseAction>
        </timeout>
            <markForSuspension>
            <errorCodes>101504, 101505</errorCodes>
            <retriesBeforeSuspension>0</retriesBeforeSuspension>
            <retryDelay>1</retryDelay>
        </markForSuspension>
        <suspendOnFailure>
            <errorCodes>101500, 101501, 101506, 101507, 101508</errorCodes>
            <initialDuration>20000</initialDuration>
            <progressionFactor>0.0</progressionFactor>
        </suspendOnFailure>
    </address>
</endpoint>

Upvotes: 0

Views: 698

Answers (2)

Heshitha Hettihewa
Heshitha Hettihewa

Reputation: 368

AFAIK the default behavior is sending a single request. And if it fails ESB marks it as timed out.So IMO it won't try again automatically upon time out. But if you need to mark the endpoint as SUSPENDED you can make <retriesBeforeSuspension>0</retriesBeforeSuspension> value into 1. So this will mark the endpoint SUSPENDED after single endpoint failure.

Hope this helps.

Upvotes: 1

Isuru Jayakantha
Isuru Jayakantha

Reputation: 318

I do not think that it is possible to do it in WSO2 ESB. As a suggestion, make sure to send a response from the server regardless of success or failure (at least send 202 ACCEPTED) then it will not retry to send the same message.

Upvotes: 0

Related Questions