Azure Blob Storage DataBus

Component: Azure Blob Storage Databus
NuGet Package NServiceBus.Azure (6.x)
Target NServiceBus Version: 5.x

Azure Blob Storage DataBus will remove the Azure storage blobs used for physical attachments after the message is processed if the TimeToBeReceived value is specified. When this value isn't provided, the physical attachments will not be removed.

Usage

busConfiguration.UseDataBus<AzureDataBus>();

Cleanup Strategy

Specify a proper value for the TimeToBeReceived property. For more details on how to specify this, read this article on discarding old messages.

Configuration

The following extension methods are available for changing the behavior of AzureDataBus defaults:

var dataBus = busConfiguration.UseDataBus<AzureDataBus>();
dataBus.ConnectionString(azureStorageConnectionString);
dataBus.Container(containerName);
dataBus.BasePath(basePathWithinContainer);
dataBus.BlockSize(blockSize);
dataBus.DefaultTTL(timeToLiveInSeconds);
dataBus.MaxRetries(maxNumberOfRetryAttempts);
dataBus.NumberOfIOThreads(numberOfIoThreads);
dataBus.BackOffInterval(backOffIntervalBetweenRetriesInSecs);
dataBus.CleanupInterval(cleanupIntervalInMilSecs);
  • ConnectionString(): The connection string to the storage account for storing DataBus properties, defaults to UseDevelopmentStorage=true.
  • Container(): Container name, defaults to databus.
  • BasePath(): The blobs base path in the container, defaults to empty string.
  • DefaultTTL: Time in seconds to keep blob in storage before it is removed, defaults to Int64.MaxValue seconds.
  • MaxRetries: Number of upload/download retries, defaults to 5 retries.
  • NumberOfIOThreads: Number of blocks that will be simultaneously uploaded, defaults to 5 threads.
  • BackOffInterval: The back-off time between retries, defaults to 30 seconds.
  • BlockSize: The size of a single block for upload when the number of IO threads is more than 1, defaults to 4MB.
  • CleanupInterval: The default time interval to perform periodic clean up of blobs for expired messages with specific TTL, defaults to 5 minutes.

Samples


Last modified