How to Managing Long term Sagas in NServiceBus

Hello everyone

Currently I am working on a project that uses nserviceBus to manage many processes. I am facing issues with long-running sagas that entail several processes and can last days or even weeks.
I am searching for suggestions on how to handle timeouts for long-running sagas. How do you make sure your sagas scale effectively, even with a long flow of messages and concurrent sagas?

Thanks in advance

Hi @sofiya752,

Thanks for reaching out!

To accurately answer your question, I would like to understand the context a little more, so I have a couple of more questions:

  • Are you running into any issues that you’re trying to address?
  • Which transport/persistence and versions are you using?
  • Depending on your persistence, do you have pessimistic or optimistic locking enabled?
  • Are the timeouts stored on the broker or in the data store (this will depend on your transport and version)?
  • Are you concerned about the number of saga records in the database?
  • Or the amount of timeouts growing in the database or broker?
  • Are you seeing failures and retries in certain sagas?

Generally speaking, unless you’re running into failures and retries due to high-contention, there’s no immediate need to do actively do anything. Sagas are designed to be long-running. If you have high contention on those sagas, this may be a different consideration.

If there’s sensitive data you can’t easily share here, feel free to send it over to support@particular.net.

Regards,
Laila