Our application receives user request for processing a task within a duedate.
Application invokes Orchestrator Rest APi, and adds queueitem with duedate for each user request.
This way the Orchestrator queue gets filled with randomly arriving queueitems.
We want to run 2 robots in the orchestrator,So, both robots read from one single queue and work on the same process in parallel.We expect that robots are listening to the queue continuously and
as and when an item arrives, one of the 2 robots(whichever idle) picks it(based on the duedate) for processing.
Question:what is the efficient way to ensure that the robots are listening to the queue?
1.Schedule robots to trigger every few minutes and inside the workflow do GetTransaction item , if present process it, else if it is null we exit.
But scheduling the robots this way is not a preferred option.
2.Follow the AddQueueItem call, by invoking StartJobs with both RobotIds,“Strategy”: “Specific”.We expect that only the idle Robot will do processing.If both Robots are busy, we expect the job to remain pending until availability of any one robot. Is this correct?
Please let us know your suggestions.