Monday, November 25, 2013

How to add sleep interval or delay between 2 mediators -WSO2 ESB

You can add thread.sleep by using script mediator. See following synapse configuration block. You can add it to between your operations.

<script language="js">java.lang.Thread.sleep(5000);</script>


However having Thread.sleep() has an impact when the ESB is working in very high concurrency levels. In ESB a thread pool is used to do the processing, if all the threads in this thread pool get blocked at the same time due to Thread.sleep() calls, then we have a problem. 

No comments:

Post a Comment