The Azure Storage Queues Transport can be configured using the following parameters:
The amount of time that the transport waits before polling the input queue, in milliseconds. Defaults: 50 ms
In order to save money on the transaction operations, the transport optimizes wait times according to the expected load. The transport will back off when no messages can be found on the queue. The wait time will be increased linearly, but it will never exceed the value specified here, in milliseconds.
Defaults: 1000 ms (i.e. 1 second)
Instructs the transport to remove any existing messages from the input queue on startup.
false, i.e. messages are not removed when endpoint starts.
The visibilitytimeout mechanism, supported by Azure Storage Queues, causes the message to become invisible after read for a specified period of time. If the processing unit fails to delete the message in the specified time, the message will reappear on the queue. Then another process can retry the message.
Defaults: 30000 ms (i.e. 30 seconds)
The number of messages that the transport tries to pull at once from the storage queue. Depending on the expected load, the value should vary between 1 and 32 (the maximum).
- 10 in Version 6 and below
- 32 in Version 7
QueuePerInstanceare obsoleted. Instead, use bus configuration object to specify the endpoint name and select a scale out option.
Settings can be overridden by adding to the
web. or the
app. files a configuration section:
<configSections> <section name="AzureQueueConfig" type="NServiceBus.Config.AzureQueueConfig, NServiceBus.Azure.Transports.WindowsAzureStorageQueues" /> </configSections> <AzureQueueConfig ConnectionString="UseDevelopmentStorage=true" />
Note that the connection string can be also configured by specifying a value for connection string called
NServiceBus/, however this value will be overridden if another is provided in the configuration section:
<configuration> <connectionStrings> <add name="NServiceBus/Transport" connectionString="UseDevelopmentStorage=true" /> </connectionStrings> </configuration>
Note that multiple connection string formats apply when working with Azure storage services. When running against the emulated environment the format is
UseDevelopmentStorage=true, but when running against a cloud hosted storage account the format is
For more details refer to Configuring Azure Connection Strings document.
Azure Storage Queues Transport changes the default serializer to JSON. The serializer can be changed using the serialization API.