![]() |
VOOZH | about |
dotnet add package Excalibur.Dispatch.Transport.AzureServiceBus --version 3.0.0-alpha.208
NuGet\Install-Package Excalibur.Dispatch.Transport.AzureServiceBus -Version 3.0.0-alpha.208
<PackageReference Include="Excalibur.Dispatch.Transport.AzureServiceBus" Version="3.0.0-alpha.208" />
<PackageVersion Include="Excalibur.Dispatch.Transport.AzureServiceBus" Version="3.0.0-alpha.208" />Directory.Packages.props
<PackageReference Include="Excalibur.Dispatch.Transport.AzureServiceBus" />Project file
paket add Excalibur.Dispatch.Transport.AzureServiceBus --version 3.0.0-alpha.208
#r "nuget: Excalibur.Dispatch.Transport.AzureServiceBus, 3.0.0-alpha.208"
#:package Excalibur.Dispatch.Transport.AzureServiceBus@3.0.0-alpha.208
#addin nuget:?package=Excalibur.Dispatch.Transport.AzureServiceBus&version=3.0.0-alpha.208&prereleaseInstall as a Cake Addin
#tool nuget:?package=Excalibur.Dispatch.Transport.AzureServiceBus&version=3.0.0-alpha.208&prereleaseInstall as a Cake Tool
Azure messaging transport implementation for the Excalibur framework, providing integration with Azure Service Bus, Event Hubs, and Storage Queues.
This package is included in the following metapackages:
| Metapackage | Tier | What It Adds |
|---|---|---|
Excalibur.Dispatch.Azure |
Starter | + Resilience (Polly) + Observability |
Tip: If you are getting started, install
Excalibur.Dispatch.Azureinstead of this package directly. It includes production-ready defaults.
This package provides Azure messaging integration for Excalibur.Dispatch, enabling:
dotnet add package Excalibur.Dispatch.Transport.AzureServiceBus
services.Configure<AzureServiceBusOptions>(options =>
{
options.ConnectionString = "Endpoint=sb://mynamespace.servicebus.windows.net/;SharedAccessKeyName=...";
options.QueueName = "my-queue";
});
services.Configure<AzureServiceBusOptions>(options =>
{
options.Namespace = "mynamespace.servicebus.windows.net";
options.QueueName = "my-queue";
});
services.Configure<AzureProviderOptions>(options =>
{
options.UseManagedIdentity = true;
options.FullyQualifiedNamespace = "mynamespace.servicebus.windows.net";
});
AZURE_SERVICEBUS_CONNECTIONSTRING=Endpoint=sb://...
AZURE_SERVICEBUS_QUEUENAME=my-queue
services.Configure<AzureServiceBusOptions>(configuration.GetSection("Azure:ServiceBus"));
services.Configure<AzureEventHubOptions>(options =>
{
options.ConnectionString = "Endpoint=sb://mynamespace.servicebus.windows.net/;...";
options.EventHubName = "my-eventhub";
options.ConsumerGroup = "$Default";
});
services.Configure<AzureEventHubOptions>(options =>
{
options.FullyQualifiedNamespace = "mynamespace.servicebus.windows.net";
options.EventHubName = "my-eventhub";
options.ConsumerGroup = "my-consumer-group";
});
services.Configure<AzureStorageQueueOptions>(options =>
{
options.ConnectionString = "DefaultEndpointsProtocol=https;AccountName=...";
options.QueueName = "my-queue";
});
services.Configure<AzureStorageQueueOptions>(options =>
{
options.StorageAccountUri = new Uri("https://mystorageaccount.queue.core.windows.net/");
options.QueueName = "my-queue";
});
services.Configure<AzureProviderOptions>(options =>
{
options.UseManagedIdentity = true;
options.FullyQualifiedNamespace = "mynamespace.servicebus.windows.net";
});
Required Azure RBAC roles:
Azure Service Bus Data Sender, Azure Service Bus Data ReceiverAzure Event Hubs Data Sender, Azure Event Hubs Data ReceiverStorage Queue Data Contributorservices.Configure<AzureProviderOptions>(options =>
{
options.TenantId = "your-tenant-id";
options.ClientId = "your-client-id";
options.ClientSecret = "your-client-secret";
options.FullyQualifiedNamespace = "mynamespace.servicebus.windows.net";
});
services.Configure<AzureProviderOptions>(options =>
{
options.KeyVaultUrl = new Uri("https://mykeyvault.vault.azure.net/");
options.UseManagedIdentity = true;
});
services.Configure<AzureServiceBusOptions>(options =>
{
// Connection
options.Namespace = "mynamespace.servicebus.windows.net";
options.QueueName = "my-queue";
options.TransportType = ServiceBusTransportType.AmqpTcp; // or AmqpWebSockets
// Performance
options.MaxConcurrentCalls = 10; // Concurrent message processing
options.PrefetchCount = 50; // Messages to prefetch
// CloudEvents
options.CloudEventsMode = CloudEventsMode.Structured; // or Binary
// Error handling
options.DeadLetterOnRejection = true; // Send rejected messages to DLQ
// Security
options.EnableEncryption = false;
});
services.Configure<AzureEventHubOptions>(options =>
{
// Connection
options.FullyQualifiedNamespace = "mynamespace.servicebus.windows.net";
options.EventHubName = "my-eventhub";
options.ConsumerGroup = "$Default";
// Performance
options.PrefetchCount = 300; // Events to prefetch
options.MaxBatchSize = 100; // Max events per batch
// Processing
options.StartingPosition = EventHubStartingPosition.Latest; // or Earliest
// Security
options.EnableEncryption = false;
options.EncryptionProviderName = null;
// Debugging
options.EnableVerboseLogging = false;
});
services.Configure<AzureStorageQueueOptions>(options =>
{
// Connection
options.StorageAccountUri = new Uri("https://mystorageaccount.queue.core.windows.net/");
options.QueueName = "my-queue";
// Processing
options.MaxConcurrentMessages = 10; // Concurrent processing
options.MaxMessages = 10; // Messages per poll (max 32)
options.PollingInterval = TimeSpan.FromSeconds(1);
options.VisibilityTimeout = TimeSpan.FromMinutes(5);
// Dead letter handling
options.DeadLetterQueueName = "my-queue-dlq";
options.MaxDequeueCount = 5; // Retries before DLQ
// Security
options.EnableEncryption = false;
// Debugging
options.EnableVerboseLogging = false;
options.EmptyQueueDelayMs = 1000;
});
services.Configure<AzureProviderOptions>(options =>
{
options.RetryOptions = new AzureRetryOptions
{
MaxRetries = 3, // Retry attempts
Delay = TimeSpan.FromSeconds(1), // Initial delay
MaxDelay = TimeSpan.FromSeconds(10), // Max delay
Mode = RetryMode.Exponential // or Fixed
};
});
services.AddHealthChecks()
.AddAzureServiceBusQueue(
connectionString: "Endpoint=sb://...",
queueName: "my-queue",
name: "servicebus",
tags: new[] { "ready", "messaging" });
public class ServiceBusHealthCheck : IHealthCheck
{
private readonly AzureServiceBusHealthChecker _healthChecker;
public async Task<HealthCheckResult> CheckHealthAsync(
HealthCheckContext context,
CancellationToken cancellationToken = default)
{
try
{
var result = await _healthChecker.CheckHealthAsync(cancellationToken);
return result.IsHealthy
? HealthCheckResult.Healthy()
: HealthCheckResult.Degraded(result.Description);
}
catch (Exception ex)
{
return HealthCheckResult.Unhealthy("Service Bus unreachable", ex);
}
}
}
services.Configure<AzureServiceBusOptions>(options =>
{
options.MaxConcurrentCalls = 32; // Increase concurrency
options.PrefetchCount = 100; // More prefetch
options.TransportType = ServiceBusTransportType.AmqpTcp; // Faster than WebSockets
});
services.Configure<AzureEventHubOptions>(options =>
{
options.PrefetchCount = 500; // More prefetch
options.MaxBatchSize = 100; // Process in batches
});
Key Azure Monitor metrics:
| Service | Metric | Alert Threshold |
|---|---|---|
| Service Bus | ActiveMessages |
> 10,000 |
| Service Bus | DeadLetteredMessages |
> 100 |
| Service Bus | ServerErrors |
> 0 |
| Event Hubs | IncomingMessages |
Baseline deviation |
| Event Hubs | ThrottledRequests |
> 0 |
| Storage Queues | QueueMessageCount |
> 10,000 |
Azure.Messaging.ServiceBus.ServiceBusException: The connection was refused
Solutions:
Azure.Identity.AuthenticationFailedException: ManagedIdentityCredential authentication unavailable
Solutions:
DefaultAzureCredential with Azure CLI loginAzure.Messaging.ServiceBus.ServiceBusException: Entity not found
Solutions:
Azure.Messaging.ServiceBus.ServiceBusException: The lock supplied is invalid
Solutions:
{
"Logging": {
"LogLevel": {
"Excalibur.Dispatch.Transport.AzureServiceBus": "Debug",
"Azure.Messaging.ServiceBus": "Information",
"Azure.Messaging.EventHubs": "Information",
"Azure.Core": "Warning"
}
}
}
services.Configure<AzureServiceBusOptions>(options =>
{
// Connection
options.Namespace = "mynamespace.servicebus.windows.net";
options.QueueName = "my-queue";
options.ConnectionString = null; // Or use connection string
options.TransportType = ServiceBusTransportType.AmqpTcp;
// Performance
options.MaxConcurrentCalls = 10;
options.PrefetchCount = 50;
// CloudEvents
options.CloudEventsMode = CloudEventsMode.Structured;
// Error handling
options.DeadLetterOnRejection = false;
// Security
options.EnableEncryption = false;
});
services.Configure<AzureProviderOptions>(options =>
{
// Authentication
options.UseManagedIdentity = true;
options.FullyQualifiedNamespace = "mynamespace.servicebus.windows.net";
options.TenantId = "";
options.ClientId = "";
options.ClientSecret = "";
// Azure metadata
options.SubscriptionId = "";
options.ResourceGroup = "";
// Key Vault
options.KeyVaultUrl = null;
// Storage (for checkpointing)
options.StorageAccountName = "";
options.StorageAccountKey = "";
options.StorageAccountUri = null;
// Settings
options.MaxMessageSizeBytes = 262144; // 256 KB
options.EnableSessions = false;
options.PrefetchCount = 10;
// Retry
options.RetryOptions = new AzureRetryOptions
{
MaxRetries = 3,
Delay = TimeSpan.FromSeconds(1),
MaxDelay = TimeSpan.FromSeconds(10),
Mode = RetryMode.Exponential
};
});
services.Configure<AzureEventHubOptions>(options =>
{
// Connection
options.ConnectionString = null;
options.FullyQualifiedNamespace = "mynamespace.servicebus.windows.net";
options.EventHubName = "my-eventhub";
options.ConsumerGroup = "$Default";
// Performance
options.PrefetchCount = 300;
options.MaxBatchSize = 100;
// Processing
options.StartingPosition = EventHubStartingPosition.Latest;
// Security
options.EnableEncryption = false;
options.EncryptionProviderName = null;
// Debugging
options.EnableVerboseLogging = false;
options.CustomProperties = new Dictionary<string, string>();
});
services.Configure<AzureStorageQueueOptions>(options =>
{
// Connection
options.ConnectionString = null;
options.StorageAccountUri = new Uri("https://mystorageaccount.queue.core.windows.net/");
options.QueueName = "my-queue";
// Processing
options.MaxConcurrentMessages = 10;
options.MaxMessages = 10;
options.PollingInterval = TimeSpan.FromSeconds(1);
options.VisibilityTimeout = TimeSpan.FromMinutes(5);
options.EmptyQueueDelayMs = 1000;
// Dead letter
options.DeadLetterQueueName = null;
options.MaxDequeueCount = 5;
// Security
options.EnableEncryption = false;
options.EncryptionProviderName = null;
// Debugging
options.EnableVerboseLogging = false;
options.CustomProperties = new Dictionary<string, string>();
});
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Excalibur.Dispatch.Transport.AzureServiceBus:
| Package | Downloads |
|---|---|
|
Excalibur.Dispatch.Azure
Experience metapackage bundling Excalibur.Dispatch with Azure Service Bus transport. Provides a single AddDispatchAzure() call for the common Azure messaging scenario. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0-alpha.208 | 48 | 6/11/2026 |
| 3.0.0-alpha.207 | 51 | 6/11/2026 |
| 3.0.0-alpha.205 | 48 | 6/10/2026 |
| 3.0.0-alpha.204 | 58 | 6/8/2026 |
| 3.0.0-alpha.203 | 60 | 6/8/2026 |
| 3.0.0-alpha.202 | 53 | 6/8/2026 |
| 3.0.0-alpha.201 | 50 | 6/8/2026 |
| 3.0.0-alpha.199 | 49 | 6/8/2026 |
| 3.0.0-alpha.198 | 54 | 5/28/2026 |
| 3.0.0-alpha.197 | 65 | 5/28/2026 |
| 3.0.0-alpha.194 | 63 | 5/20/2026 |
| 3.0.0-alpha.193 | 69 | 5/13/2026 |
| 3.0.0-alpha.192 | 67 | 5/13/2026 |
| 3.0.0-alpha.191 | 53 | 5/13/2026 |
| 3.0.0-alpha.189 | 52 | 5/12/2026 |
| 3.0.0-alpha.187 | 53 | 5/8/2026 |
| 3.0.0-alpha.185 | 64 | 5/7/2026 |
| 3.0.0-alpha.183 | 51 | 5/7/2026 |
| 3.0.0-alpha.182 | 51 | 5/6/2026 |
| 3.0.0-alpha.181 | 59 | 5/6/2026 |