In Versions 7.4 and above, the Azure Storage Queues transport no longer relies on the timeout manager to provide delayed delivery. Instead, the transport uses the same storage account to provide delayed delivery without needing an external persister.
How it works
When an endpoint is started, the transport creates a storage table to store the delayed messages. To ensure a single copy of delayed messages is dispatched by any endpoint instance, a blob container is used for leasing access to the delayed messages table.
By default, the storage table and blob container names are constructed using a naming scheme that starts with the word
delays followed by SHA-1 hash of the endpoint's name. For example,
2fd4e1c67a2d28fced849ee1bb76e7391b93eb12 is a SHA-1 hash of an endpoint name.
Overriding table/container name
Delayed messages table and container names can be overridden with a custom name:
var transport = new AzureStorageQueueTransport("connection string"); transport.DelayedDelivery.DelayedDeliveryTableName = "myendpoint"; endpointConfiguration.UseTransport(transport);
Disabling delayed delivery
Delayed delivery can be turned off to disable unnecessary Azure Storage table polling. Delayed delivery should not be turned off if any of the following features are required:
- Deferred messages
- Saga timeouts
- Delayed retries
var transport = new AzureStorageQueueTransport("connection string", useNativeDelayedDeliveries: false); endpointConfiguration.UseTransport(transport);
When upgrading to a version of the transport that supports delayed delivery natively, it is safe to run with both native-delay and non-native-delay endpoints at the same time. Endpoints supporting native delayed delivery can send delayed messages to endpoints that are not yet aware of the native delay infrastructure. These endpoints can continue to receive delayed messages from non-native endpoints as well.