Question

Agent(Standard or Advanced) Process Each record in different Thread or in same Thread

When Agent(Standard or Advanced) Processing some thousands of records will it Process each record in new thread or in same thread.

 

**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.

Correct Answer
January 2, 2017 - 12:55am

Hi,

Below explanation provides the running of the Agents irrespective of Agent type.

Once PegaRULES has been started and the agent activities have been enabled, the activity tasks must be run at their stated intervals. 

Each agent activity started by the Master Agent is run in its own separate thread for processing, but when the agent wakes up, it queues the activity in a batch requestor that runs in a thread pool (of size specified in prconfig.xml threadpoolsize) from which these threads are obtained. This means that no more than the number of threadpoolsize agent activities will run concurrently, irrespective of the wakeup intervals on the queue.

Some agents (such as external lookup agents) may take more time to run their task (15 to 20 seconds) than other agents (.1 second).  Threads for these different queues run concurrently.  

Thanks,

Supraja 

Comments

Keep up to date on this post and subscribe to comments

January 1, 2017 - 8:17am

Hello,

Each time a standard/advanced agent wakes up to run based on a schedule it will be coupled to a requestor for the sake of this conversation a thread. I will then within that thread process all records expected in that wake up interval typically up to the maxrecords value specified. Then it goes back to sleep and does the process all over again.

 

Pega
January 2, 2017 - 12:55am

Hi,

Below explanation provides the running of the Agents irrespective of Agent type.

Once PegaRULES has been started and the agent activities have been enabled, the activity tasks must be run at their stated intervals. 

Each agent activity started by the Master Agent is run in its own separate thread for processing, but when the agent wakes up, it queues the activity in a batch requestor that runs in a thread pool (of size specified in prconfig.xml threadpoolsize) from which these threads are obtained. This means that no more than the number of threadpoolsize agent activities will run concurrently, irrespective of the wakeup intervals on the queue.

Some agents (such as external lookup agents) may take more time to run their task (15 to 20 seconds) than other agents (.1 second).  Threads for these different queues run concurrently.  

Thanks,

Supraja