Question

I have got a saga which touches 6 different endpoints and saga is sort of workflow. Is there anyway i can setup some timeout which gets executed and if the process is not over I will like to end that saga and do something???

Was it helpful?

Solution

The idea of a saga is for a stateful workflow and one that is especially useful to provide compensatory actions when said messages don't arrive.

When your saga starts, request a timeout and as your messages arrive, you can keep state in your saga data. When the timeout message occurs, you know if all of the said actions have been completed or if not what compensatory actions to take is upto your business workflow.

Take a look at the following article. (and the Timeouts section) http://particular.net/articles/sagas-in-nservicebus

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top