Oracle SOA Suite 12c: throttling control in BPEL to avoid contention

Oracle SOA Suite 12c: throttling control in BPEL to avoid contention

Published on: Category: Oracle

When you work with inbound JCA adapters (for instance JMS, AQ, MQ) in SOA Suite, you need to be able to control the TPS (transactions per second). This will allow you to avoid stuck threads, in case you receive unexpected batch messages in the domain load tuning. In this short post, I will show how to set up the parameters and calculate your TPS.

  1. Add the minimumDelayBetweenMessages in the code
    This is the parameter that will do the magic. It adds a thread sleep as part of the instance execution—that is, on a per polling thread basis. The setting is measured in milliseconds.
  2. How to do that?
    The property will be added in the SCA file (composite.xml) in your project. It is a <Service> properties related with the partner link adapter that connects in your JCA resource. 

Note: it is not a binding property.  

An example:

When you deploy your code in the SOA server, you will be able to check the value in the JCA adapter using EM console. You can also change it on the fly, in case you need to tune the value and test it.

3. How to calculate the TPS
Consider a scenario where you need to control throttling in a domain that consists of:

  • 4 managed servers nodes
  • 2 threads per adapter (set in InboundThreadCount parameter)
  • 500 milliseconds (0.5 second) set in minimumDelayBetweenMessages

To calculate the TPS, use this formula:

(MS nodes * thread count) / (minimumDelay/1000)

In this example you will have (4 * 2) = 8 threads connected in the queue. Each thread will delay 500/1000 = 0.5 second before pushing a new message. You will have max 16 TPS.

According Oracle documentation

Accordingly with Oracle documentation, if the instance execution itself (the time between the two most recent message publications) exceeds the value of minimumDelayBetweenMessages, no delay will be added (hence the name "minimumDelay...").

This means that when you set the minimumDelay, you will also set the maximum TPS. This can be lower in case your thread transaction execution time is higher than the minimumDelay parameter.


Eduardo Barra Cordeiro
About the author Eduardo Barra Cordeiro

Eduardo is a Fusion Middleware Consultant with more than 20 years in IT world. In the last 9 years he has been working in the Oracle Fusion Middleware space, starting as a developer, then a developer lead in a global team, with team members from Brazil, India and USA. Since 2014 he started working in the architecture role, along with development teams for BPEL projects, supporting BPEL, OSB, BPM and BAM environments and supporting high availability WebLogic domains. Eduardo has more than 10 years of experience working in the agile world, achieved being a certified SCRUM Master and sometimes the role of Product Owner. In 2018 he started a new challenge moving to the Netherlands to work with Qualogy clients using his technical and soft skills.

More posts by Eduardo Barra Cordeiro
Comments (1)
  1. om 11:11

    Iam so thrilled because of finding your alluring website here.Actually i was searching for <a href="" rel="dofollow">Oracle BPM</a>.Your blog is so astounding and informative too..Iam very happy to find such a creative blog. Iam also find another one by mistake while am searching the same topic<a href="" rel="dofollow">Oracle SQL</a>.Thank you soo much..