/
Process for long running jobs

Process for long running jobs

There are bunch of instances where in it will take considerably more time to complete a request for ex. project creation from templates. In such scenarios we cannot process the request in synchronous manner as such processes may take a long time to complete. We will also have to consider the error handling part as long running process may encounter some problems during their run. Such errors may include but not limited to the following,

  • Destination service not available

  • Credentials expiry

  • backend data store not available

In such cases it is best to retry the request after some time as the missing services may come up while the messages wait for retry.

Architecture Diagram :-

We are planning to use the above architecture to handle the error handling in the long running jobs. The steps for the happy path and the failure have already been listed in the diagram.

 

Details of the RabbitMQ configurations :-

Environment - Development

Host

azurerabbitmqdev.eastus.cloudapp.azure.com

vhost

/makino

exchange (direct)

Name - x.makino.direct
Type - direct exchange
Routing key - routing.makino.contractReviewProcess (bound to queue - q.makino.contractReviewProcessor)

exchange (dead letter)

Name - x.makino.deadLetter
Type - direct exchange
Routing key - routing.makino.deadLetter (bound to queue - q.makino.deadLetter)

queue (contract review processor)

Name - q.makino.contractReviewProcessor
Routing Key - routing.makino.contractReviewProcess (Routed from exchange - x.makino.direct)

queue (dead letter)

Name - q.makino.deadLetter
Routing Key - routing.makino.deadLetter (Routed from exchange - x.makino.deadLetter)