Saga vs Delayed message delivery performance differences

(Raj Shelar) #1

I am using NServiceBus 5, I want use delayed message to be accessible after specific amount of time ( Also handler of that message will talk to database for getting data. Just wanted know performance wise saga timeout and delayed message.

(Hadi Eskandari) #2


If you have just one message type and a handler, delayed delivery seems to be a good choice, but systems are usually not that simple and if you have to deal with multiple message types, state, concurrency, etc. then sagas are better suited for that.

Performance-wise, saga timeouts are using messages as well, so they are similar to how delayed delivery works. The way the message is delivered, however, depends on your transport of choice. Some transports like Rabbit have built in delayed delivery mechanism, where others like MSMQ use a separate queue to achieve that. NServiceBus of course, has all that abstracted away from you.

Hope this helps,

(Raj Shelar) #3

I am looking saga in two aspects, 1. For statement management and 2. For scheduling some activity. If there is no much details for state management can we use message instead of saga and delayed message for scheduling activity