Non-Durable Messaging

Component: NServiceBus | Nuget: NServiceBus (Version: 4.x)
Standard support for version 4.x of NServiceBus has expired. For more information see our Support Policy.

Relaxes message delivery guarantees in order to achieve better performance.

This can make an endpoint more susceptible to message loss during server crashes and restarts. See effect on transports for more details.

Enabling non-durable messaging

This feature can be enabled in two ways

For specific message types

Via an Express Attribute

A message can be configured to be non-durable via the use of an [ExpressAttribute].

public class MessageWithExpress :

Using the configuration API

A subset of messages can be configured to be non-durable by using a convention.

    type =>
        return type.Name.EndsWith("Express");

Effect on transports

Individual transports interpret "non-durable" messaging with a custom approach dependent on how the underlying technology functions.


The default behavior of MSMQ is to use the concept of Store and Forward. In this approach messages are stored durably on disk at the sender and then delivered by MSMQ to the receiver. When non-durable messaging is used the MSMQ Transport sends messages in Express Mode. The underlying setting that is used to achieve this is to set Message.Recoverable to false.

Non durable messages requires the queues to be non transactional. Use non-transactional queues by setting useTransactionalQueues to false in the transport connection string.

When using non transactional queues an endpoint has to be configured to not use transactions.


Non-durable messages are sent using the RabbitMQ non-persistent delivery mode, which means the messages are not persisted to disk by the broker. If durable messaging has been disabled globally, the exchanges and queues created by the broker will be declared as non-durable as well. If the broker is restarted, all non-durable exchanges and queues will be removed along with any messages in those queues.

When using non-durable messaging, the RabbitMQ transport disables publisher confirms as well, to improve sending performance at the expense of reliability.

SQL Server

The SQL Server transport has no support for this setting and it is ignored.


The Azure transports have no support for this setting and it is ignored.


Related Articles

Last modified