Larry Pinsky · Jan 20, 2021

Multiple Threads In Operations

I have a BPL that calls a business service (actually does lots of other things unrelated to my question).  We receive an acknowledgement back containing data that is processed in the BPL and sent to the source system. The process of sending to our downstream system "A" and receiving the response takes about 20 seconds per transaction (very slow on system A's side).  Due to this slowness, we end up with a backlog close to 1000 messages by the end of the workday.

Is there a way to make this multi-threaded so we can send many messages to system A?  I tried making the call asynchronous in the BPL, however still only one message at a time was sent.  The business operation is a SOAP call.


Product version: Ensemble 2018.1
0 271
Discussion (4)2
Log in or sign up to continue

Check the settings on the business operation -- you should set the Pool Size > 1. This controls how many processes the operation uses to process requests.

Thank you Marc.  The pool size confused me because the help states for business operations it should be 1.  Is there a max that this should not be over?  And does it affect the processing of the server (using up more memory, etc).

And now that I re-read the help, it states 1 is the default value.  

A pool size of 1 is the recommendation when you need to maintain FIFO (process all messages strictly in the sequence that they arrived). Going above 1 is fine if FIFO isn't required.

Each additional pool job will result in an additional OS-level process, which adds a little bit of memory usage. How much CPU is used by each process depends on how much work the operation is doing. Essentially, changing pool size from 1 to 2 has the same resource impact as adding another identical business operation.

The max possible pool size depends on lots of factors. I would suggest starting small (2? 4?), see how that affects the queue, and increase accordingly. Having a pool size of 10, for instance, isn't likely to cause performance or resource problems unless your operation is doing something crazy. If you start getting into a pool size of dozens you might want to take a closer look with the WRC. One of your main limitations might be how many concurrent connections System A allows you to make.