Hi Eric

Today I have some questions regarding timeouts. First the timeout feature does not seam to work on my side. Maybe I did something wrong, but the results of my tests are not as expected. Hope someone can help.

Ref: Address Endpoint - http://wso2.org/project/esb/java/1.6/docs/ESB_Configuration_Language.html

/ Address endpoints can timeout if responses fail to arrive at Synapse by a predefined timeout-duration specified in seconds. The timeout action specifies whether to discard responses that arrives late, or to trigger a fault. Synapse has a periodic timeout handler that triggers itself at each 15 second interval. Thus endpoint timeouts will have a +/- error on actual trigger time. Though this can be minimized by setting a System property "synapse.timeout_handler_interval" to a millisecond duration below the desired endpoint timeout, care must be taken as a lesser value may have a higher overhead on the system. /

/ An endpoint that fails may be suspended for a specified duration after such a failure, during which new messages will not be processed through the endpoint. The 'suspendDurationOnFailure' could specify an optional value in seconds for which this endpoint should be suspended/.


I have a simple test service named SimpleWebService deployed to a JBoss AS, a SimpleWebServiceProxy defined on the ESB side, which uses a defined endpoint from the local registry. For that endpoint a timeout of one second is specified. No matter if I choose “discard message” or “execute fault sequence” it doesn’t work. The service call can last five seconds or longer, but the response will get passed back as if no timeout would have been specified.

Since your timeout is < 15s, it will not be detected with the "default" timeout detection of 15s.. So for your case, you will need to run the timeout detector every 500ms or so.. but in real life, I would assume you don't really want to do this every 500ms, but rather every 5s or so..

As I can see in the statistics, the correct ProxyService and Endpoint were used. Of course the response times are all above one second, so I ask myself why the timeout event didn’t occur.

I think the above explanation would help understand the issue.. you can edit the webapp/WEB-INF/classes/conf/wrapper.conf and add a new line like shown below and restart the ESB..

wrapper.java.additional.13=-Dsynapse.timeout_handler_interval=5000

Besides this problem I would like to know if it would be possible, that a SOAP client could specify a timeout value in a custom SOAP header field in order to overwrite the ESB configuration of a particular endpoint timeout. A timeout on endpoint basis seems to be too inflexible. Even if it would be possible to define it on the level of proxy services (which currently only seems to be the case if I use anonymous endpoints) I would have to define multiple instances of a proxy service (which would only differ in their timeout definition) to account for different client requirements.

This cannot be done right now.. but it is possible to support this.. a new JIRA :-) ?

asankha
_______________________________________________
Esb-java-user mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/esb-java-user

Reply via email to