PollyAzureQueueStorage 1.0.0

dotnet add package PollyAzureQueueStorage --version 1.0.0
                    
NuGet\Install-Package PollyAzureQueueStorage -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PollyAzureQueueStorage" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PollyAzureQueueStorage" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="PollyAzureQueueStorage" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PollyAzureQueueStorage --version 1.0.0
                    
#r "nuget: PollyAzureQueueStorage, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package PollyAzureQueueStorage@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PollyAzureQueueStorage&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=PollyAzureQueueStorage&version=1.0.0
                    
Install as a Cake Tool

PollyAzureQueueStorage

NuGet NuGet Downloads CI License: MIT

Polly v8 resilience pipelines for Azure Queue Storage — retry, timeout, and circuit-breaker for QueueClient operations.

Why PollyAzureQueueStorage?

Azure Queue Storage is a durable, scalable message queue — but transient failures (throttling 429, service unavailability 503, gateway timeouts 504) can disrupt your messaging pipeline. PollyAzureQueueStorage wraps QueueClient in a Polly v8 ResiliencePipeline so send, receive, peek, and delete all automatically retry on transient errors.

Completes the Azure storage trio alongside PollyAzureBlob and PollyAzureTableStorage.

Installation

dotnet add package PollyAzureQueueStorage

Quick start

DI registration

`csharp services.AddPollyAzureQueueStorage( connectionString: Environment.GetEnvironmentVariable("AZURE_STORAGE_CONN"), queueName: "my-queue", configure: pipeline ⇒ pipeline .AddRetry(new RetryStrategyOptions { MaxRetryAttempts = 3, Delay = TimeSpan.FromSeconds(1), BackoffType = DelayBackoffType.Exponential, ShouldHandle = QueueStorageTransientErrors.IsTransient, }) .AddTimeout(TimeSpan.FromSeconds(30)));

// Use via DI public class QueueService(ResilientQueueClient queue) { public async Task SendAsync(string message, CancellationToken ct = default) ⇒ await queue.SendMessageAsync(message, ct); } `

WithPolly() extension on existing QueueClient

`csharp var queueClient = new QueueClient(connectionString, "my-queue");

var resilient = queueClient.WithPolly(pipeline ⇒ pipeline.AddRetry(new RetryStrategyOptions { MaxRetryAttempts = 3, Delay = TimeSpan.FromSeconds(1), BackoffType = DelayBackoffType.Exponential, ShouldHandle = QueueStorageTransientErrors.IsTransient, }));

await resilient.SendMessageAsync("hello"); var messages = await resilient.ReceiveMessagesAsync(maxMessages: 10); `

API surface

Method Description
SendMessageAsync(string, CancellationToken) Enqueue a plain-text message
SendMessageAsync(BinaryData, CancellationToken) Enqueue binary/JSON message
ReceiveMessagesAsync(int, TimeSpan?, CancellationToken) Dequeue up to N messages
PeekMessagesAsync(int, CancellationToken) Peek without dequeuing
DeleteMessageAsync(string, string, CancellationToken) Delete after processing
ExecuteAsync<T>(Func<CancellationToken, ValueTask<T>>, CancellationToken) Custom operation

Transient error predicate

QueueStorageTransientErrors.IsTransient handles:

Exception Condition
RequestFailedException Status 429 (throttled), 503 (unavailable), 504 (gateway timeout)
HttpRequestException Network-level failure
TaskCanceledException Timeout or cancellation

Supported frameworks

et6.0 · et8.0 · et9.0

Package Wraps
PollyEFCore Entity Framework Core DbContext
PollyDapper Dapper IDbConnection
PollyMongo MongoDB IMongoCollection<T>
PollyAzureBlob Azure Blob Storage BlobContainerClient
PollyNpgsql Npgsql PostgreSQL NpgsqlConnection
PollySqlClient System.Data.SqlClient SqlConnection
PollyCosmosDb Azure Cosmos DB CosmosClient
PollyGrpc gRPC channel calls
PollyRabbitMQ RabbitMQ IModel channel
PollyAzureServiceBus Azure Service Bus sender/receiver
PollyRedis StackExchange.Redis IDatabase
PollyMediatR MediatR IMediator
PollyOpenAI OpenAI ChatClient
PollyHealthChecks ASP.NET Core health checks
PollyBackoff Pre-built backoff pipelines
PollyChaos Chaos engineering helpers
PollyKafka Confluent Kafka producer/consumer
PollySignalR SignalR HubConnection
PollyRateLimiter .NET rate limiting middleware
PollyElasticsearch Elastic.Clients.Elasticsearch
PollyAzureKeyVault Azure Key Vault SecretClient
PollyAzureEventHub Azure Event Hubs producer
PollySendGrid SendGrid email client
PollyMassTransit MassTransit IBus
PollyAzureTableStorage Azure Table Storage TableClient
PollyMailKit MailKit SMTP email client
PollyHangfire Hangfire IBackgroundJobClient

License

MIT © Justin Bannister

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 46 6/24/2026

1.0.0: Initial release. ResilientQueueClient wraps Azure.Storage.Queues QueueClient in a Polly v8 ResiliencePipeline. Includes QueueStorageTransientErrors predicate covering RequestFailedException (429, 503, 504), HttpRequestException, and TaskCanceledException. Supports net6.0, net8.0, and net9.0.