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 it is necessary to be able to control the TPS (transactions per second). It will allow you to avoid stuck threads in case you receive batch messages that usually are not expected in the domain load tuning. In this short post I will show how to setup 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 add in the SCA file (composite.xml) in your project. It is a <Service> properties related with the partner link adapter that connect 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 flight in case you need to tune the value and test it.

3. How to calculate the TPS?
Consider the scenario where you need to control throttling in a domain where you have:

  • 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 push 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...").

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

Reference: https://docs.oracle.com/middleware/1213/adapters/develop-soa-adapters/GUID-D9F90C07-D09D-4AA5-8DB1-99AA993B43FB.htm#TKADP9469 

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 09:09

    Thanks for sharing this Informative content. Well explained. Got to learn new things from your Blog
    <a href="https://www.erptree.com/course/oracle-r12-financials-training-in-hyderabad/">Oracle R12 Financials Training in Hyderabad</a>

Reply