Relaxed message delivery guarantees to improve performance at the cost of reliability.
Overview
Non-durable messaging trades delivery guarantees for better performance, increasing the risk of message loss during server crashes or restarts.
This approach significantly increases the risk of message loss when servers crash or restart. See Effect on Transports for details.
See the documentation of the individual transport for details on how to enable non-durable messaging.
Effect on Transports
Each transport implements non-durable messaging differently based on its underlying technology.
MSMQ
MSMQ typically uses Store and Forward by default, storing messages durably on disk before delivery. With non-durable messaging, MSMQ sends messages in Express Mode by setting Message.
to false
.
Non-durable messages require non-transactional queues. Configure this by setting useTransactionalQueues
to false
in the transport connection string.
When using non-transactional queues, endpoints must be configured not to use transactions.
RabbitMQ
Non-durable messages are sent using RabbitMQ's non-persistent delivery mode, which means the messages are not persisted to disk by the broker.
See controlling delivery mode in the RabbitMQ transport documentation.
SQL Server
The SQL Server transport has no support for this setting and it is ignored.
Azure Service Bus
The Azure Service Bus transport has no support for this setting and it is ignored.
Azure Storage Queues
The Azure Storage Queues transport has no support for this setting and it is ignored.
Amazon SQS
The Amazon SQS transport has no support for this setting and it is ignored.