Skip to content
On this page

Azure Storage Queues

PM> Install-Package Shuttle.Esb.AzureMQ

In order to make use of the AzureStorageQueue you will need access to an Azure Storage account or use the Azurite emulator for local Azure Storage development for local development.

You may want to take a look at how to get started with Azure Queue storage using .NET.

Configuration

The queue configuration is part of the specified uri, e.g.:

<inbox
    workQueueUri="azuremq://connection-name/queue-name?maxMessages=15"
    .
    .
    .
/>
Segment / ArgumentDefaultDescription
connection-namerequiredWill be resolved by an IAzureConfiguration implementation (see below).
queue-namerequiredThe name of queue to connect to.
maxMessages1Specifies the number of messages to fetch from the queue.

IAzureConfiguration

string GetConnectionString(string name);

The GetConnectionString() method should return the Azure Storage connection string to use. For local azurite development this would be UseDevelopmentStorage=true.

The relevant IAzureConfiguration should be registered with the IComponentRegistry:

IComponentResolver.Register<IAzureStorageConfiguration, DefaultAzureStorageConfiguration>;

DefaultAzureConfiguration

This implementation will return the appSetting value for the specified connection-name as the Azure Storage conenction string:

<appSettings>
    <add key="azure" value="UseDevelopmentStorage=true" />
</appSettings>

<inbox
    workQueueUri="azuremq://azure/server-inbox-work-queue"
    .
    .
    .
/>
Azure Storage Queues has loaded