Where are the messsages between retries?

We’re using Sql Transport and persistence, Outbox is enabled as well.
I was wondering where does NServiceBus store messages after they failed, before they’re being retried?

I stopped the endpoint, and was searching through all the transport tables (endpoint, endpoint.Timeouts, endpoint.TimeoutsDispatcher), but couldn’t find the message anywhere. It’s not yet out of retries, so it’s not in the error queue. But I checked anyway just to be sure.

Thanks
Philipp

The mentioned locations are exactly the locations the message could be. If the transport supports native deferred delivery then the message will be in the regular queue table but if you are using an older version of NServiceBus it would be in either the .Timeouts or .TimeoutsDispatcher tables.

See: SQL Server Native Delayed Delivery • SQL Server Transport • Particular Docs

– Ramon

1 Like

Thank you. I’ll need to try this again. My observed behavior seems to be odd then, maybe I did something wrong.

As I understand the native delayed delivery docs, this would be the preferable solution, instead of using the current timeouts? I’m talking about a completely new system, so no need for any migration or backwards compatibility

EDIT: and this way we could also get rid of the TimeoutsData tables in the persistence DB, right?
– Philipp

That is correct, native is preferred if supported by the transport and after enabling native timeouts and no data is left in these timeouts tables these can be safely removed.

– Ramon

1 Like