I want to specify timeout duration for a non suspend endpoint as 3000ms (3sec). I used the configuration in WSO2 documentation and configured my endpoint file as follows:
<?xml version="1.0" encoding="UTF-8"?>
<endpoint name="myEndpointFile" xmlns="http://ws.apache.org/ns/synapse">
<property expression="get-property('endpointAddress')" name="endpointAddress"/>
<address uri="${endpointAddress}">
<timeout>
<duration>3000</duration>
<responseAction>fault</responseAction>
</timeout>
<suspendOnFailure>
<errorCodes>-1</errorCodes>
<initialDuration>0</initialDuration>
<progressionFactor>1.0</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
<markForSuspension>
<errorCodes>-1</errorCodes>
</markForSuspension>
</address>
To be able to test it, I used a mocky.io endpoint that has 7000ms(7sec) response delay http://www.mocky.io/v2/5e7b12732d00008f00119be6?mocky-delay=7000ms
When I tried to call the API which calls that endpoint URL, I got still success HTTP 200 OK even if my timeout duration is 3000ms (3sec).
Here is my synapse.global_timeout_interval parameter in synapse.properties:
synapse.global_timeout_interval=200000
and also my http.socket.timeout property value in passthru-http.properties:
http.socket.timeout=180000
Version: WSO2EI6.4.0
Thanks for any idea!
Regards
