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 | |
vhost | /makino |
exchange (direct) | Name - x.makino.direct |
exchange (dead letter) | Name - x.makino.deadLetter |
queue (contract review processor) | Name - q.makino.contractReviewProcessor |
queue (dead letter) | Name - q.makino.deadLetter |