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”
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