Handling timeouts at the ESB process level

Posted by Admin on 09-Mar-2011 10:30

I develop on Progress Sonic ESB ver 7.6. I would like to know how to handle timeouts that occur at a process level. To elaborate with an example:

An ASP.NET web service is calling an ESB process I have developed. The web service has a timeout of 20 ms. If the ESB process does not complete processing the request sent to it from the web service within 20ms, the web service will try to read the response before the ESB process actually sends a response back. As a result, the web service throws an exception with the content "ESB response is not an XMLMessage. Cannot process response.". I can set a timeout on the ESB process itself so that it returns within 20 ms even if it has not completed processing, but this would still generate an exception, since the process is not actually returning a valid response. Is there some way for a process to specify a default xml response (indicating a timeout) that it can return in the event of a timeout?

All Replies

Posted by tsteinbo on 15-Mar-2011 05:39

You would want to add processing to the reject endpoint of the process. In the most simple case you set that to REPLY_TO as well. But since you probably want to format the response have a process attached to the reject endpoint that eventually also has REPLY_TO as exit endpoint.

Thomas

Posted by Admin on 17-Mar-2011 12:21

This does not work. A timeout does not seem to be triggering a rejected message. FYI, the way I tried to simulate a timeout is by deleting a database service instance that my ESB process is using.

Regards,

Aditya Sen

P Please consider the environment before printing this e-mail

The information in this email message and in any attached documents is confidential, may be protected from disclosure and no waiver of any privilege is intended.  If you are not the intended recipient, any dissemination, distribution or copying is strictly prohibited.  If you believe that you have received this e-mail message in error, please destroy this message, delete any copies held on your systems and notify the sender immediately.  You should not retain, copy or use this email for any purpose, nor disclose all or any part of its content to any other person.

Posted by tsteinbo on 18-Mar-2011 04:11

This does not work. A timeout does not seem to be triggering a rejected message. FYI, the way I tried to simulate a timeout is by deleting a database service instance that my ESB process is using.

Hmm it should. But now that you say this I remember that process timeout processing is only performed after the entry of the next step. Qouting from the documentation (ESB Developer Guide) page 47:

Time to live for an ESB process is checked when the message arrives at the service. If the current time by the local system clock (measured in GMT) is greater than the ESB process entry timestamp plus timeToLive, the RME is used:

     rejectedCode = TIME_TO_LIVE_EXPIRED

Messages sent to the RME have the same QoS as the service from which they are rejected.

Posted by Admin on 18-Mar-2011 09:51

Thank You for the additional tips. I will research this further and will

update this post if I find out anything useful.

Regards,

Aditya Sen

This thread is closed