Multi-threaded Agent Processing

Does PRPC support multiple threads for processing work / queued items by an agent? How do we configure an agent to run on multiple threads?


For example: If I have a single node system dedicated for batch processing, where an agent is configured to handle adhoc bulk request say 25,000 records per transaction, is it possible to configure the agent to spilt 25,000 records into 5,000 records each as seperate thread?


In Java world, we would be able to span multiple threads for near parallel processing of these huge requestes using multi threaded approach.

Please share some thoughts on how Pega agents can be used to address above problem.

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.


Keep up to date on this post and subscribe to comments

December 4, 2013 - 5:22pm

The problem we are facing is this:


In a single node, an agent recieves 3 requests at a point in time. The first request is huge in such a way that the other two small requests have to wait until the first request is completed.

February 17, 2014 - 6:13am

you can create prioritize queue and distribute the load.

February 19, 2014 - 5:03am

Hi Balaji,


Found any solution for your query..?   please post the same.





February 20, 2014 - 4:26am
we have to create 5 agent threads then

April 1, 2014 - 9:52am

You can try creating child requestors for each record and kill that child requestor once the process is done. For ex: if your agent activity pulls 3 records to be processed, you will loop in those 3 records and use queuebatchactivity. This way you can achieve parallel processing.


Be cautious about creating multiple child requestors, this would be overhead for server and can end up with server hanging problems.

November 7, 2014 - 9:14am


Did you find a solution for this????

November 17, 2014 - 3:00pm

nope, but I heard they have a java step in the agent's processing activity to span threads.. not sure how it is implemented and works

February 24, 2015 - 10:55pm

You can create a separate queue for large size items and create one more agent whcih should be specific to process items from this queue.


Same could be achieved through Agent queue method---pass the ruleset and agent name..

March 24, 2015 - 3:24am

pick the records on a seperate advanced agent and then distribute it to multiple standard agents.

November 25, 2015 - 9:22am

Steps to configure

1. Refer multiple agent actiivty instances ( say 4 instances of the same activity in the agent rule, just change the label but call same actvity)

2. Create seperate table to handle requests that need to be processed.(maintain seperate property say status to identify the record status. so your agent activity should run as particular record is in the table)

3. In the agent actiivty maintain a property say recordcount=5 ,You can create DSS fot this

4. Then write an query to Block the records to the table  (say RDB-Save) whtich records you need to process.

5.  One the records are blocked fetch those records and call another activity to loop through the results and process each record. So here based on the recordcount the agent activity will block 5 records for 1st instance and process. if there are 20 records then 4 acitivty instances will share 5 each and do parallel processing.

Please let me know if any one need more information.