asp.net-coreasynchronousnservicebusrecovery

Does NServiceBus guarantee publishing messages from ASP.NET Core Controller?


I am publishing messages from my ASP.NET Core Controller in response to some synchronous command. If a partial failure happens in between successfully committing my database transaction and NServiceBus actually dispatching my published messages while using outbox, does NServiceBus recover and resend them?

Where can I find the responsible recovery code for this specific scenario in the NServiceBus code repos?

Thank you!


Solution

  • Transactional Session feature is what you're looking for and it's well documented. You'll find details and how to configure it here. This will require enabling the Outbox feature for de-duplication as well.