RabbitMQ transport message persistence


I have a web api sending a command to an NServiceBus endpoint and the message delivery_mode is set to persistent as I would expect. However, when that message gets processed and publishes out events, the delivery_mode on those messages is set to non-persistent which is not expected. We have the outbox functionality enabled, so I guess it could be something to do with that.

What causes this to happen? What is the fix?


What type of outbox persistence are you using?

Can you confirm that the data stored for each operation does not contain the “NonDurable” option?

Also what version of the RabbitMQ transport adapter are you using?

We are using NServiceBus.NHibernate version 6.2.7. The version of NServiceBus.RabbitMQ is 3.1.0.

Got it, can you look at the “TransportOperations” column for one of the problematic messages and see what metadata is in there?

Sure, I have one. What metadata in particular?

Look to see if there is a “NonDurable” option in there?

There is nothing in there that says NonDurable.

Thanks for confirming, I think this might be a bug in NServiceBus v5, will keep you posted.

We’ve confirmed this to be a v5 bug and will release a patch shortly, see Messages are sent as non-durable if outbox is enabled on Version 5 · Issue #5074 · Particular/NServiceBus · GitHub for more details.

Thanks for bringing this to our attention.



Thank you, do you have an estimated time on this patch please?

We have a PR that fixes the issue and we’ll release as soon as we’re done testing the patch. Releasing sometime tomorrow GMT+1 is my best estimate at the moment.

Does that timeline work out for you?



Oh yes, that is quicker than I expected! I appreciate the quick turnaround. Thank you.

Hi Lee,

I wanted to let you know that we’ve released NServiceBus 5.2.25, which has the fix for the issue you reported:

Perfect. Thanks very much for the fast response.