Sagas with same message

Based on this thread below, if a saga receive a same message at the same time, one will fail and one will succeed, how do we handle the failed message so that i can send a appropriate response message back to the caller ? something like “record in use”

What happens if saga receives two messages at the same time? - Discussion | Particular Software

it would be great if there is a sample on how to do this, i dont mind creating one and contributing based on the response of this thread.

Thanks - Nen

Hi Nen,

Keep in mind that failed messages for a saga will run through the recovery process similar to all other failed messages in NServiceBus. So they will be retried according to the recoverability policy and when they are retried, they’ll be handled normally according to the rules of your saga. Presumably the record will no longer be in use at that time.

That said, if you want to check for a specific type of exception, I’d suggest implementing a custom recoverability process