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.

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 (4)
  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>

  2. om 08:08

    If you looking for Oracle SOA Course take a look at this given link https://smconsultant.com/training/oracle-fusion-middleware/oracle-soa-training/ you will have a great experience in orcale SOA course from SM Consultants. It will not only give you an exposure to the domain but also help to learn cross technologies and develop an inclination towards it.

  3. om 08:08

    If you looking for Oracle SOA Course take a look at this given link https://smconsultant.com/training/oracle-fusion-middleware/oracle-soa-training/ you will have a great experience in orcale SOA course from SM Consultants. It will not only give you an exposure to the domain but also help to learn cross technologies and develop an inclination towards it.

  4. om 08:08

    If you looking for Oracle SOA Course take a look at this given link https://smconsultant.com/training/oracle-fusion-middleware/oracle-soa-training/ you will have a great experience in orcale SOA course from SM Consultants. It will not only give you an exposure to the domain but also help to learn cross technologies and develop an inclination towards it.

Reply