CasCap.Api.Azure.ServiceBus
1.7.1
Prefix Reserved
See the version list below for details.
dotnet add package CasCap.Api.Azure.ServiceBus --version 1.7.1
NuGet\Install-Package CasCap.Api.Azure.ServiceBus -Version 1.7.1
<PackageReference Include="CasCap.Api.Azure.ServiceBus" Version="1.7.1" />
<PackageVersion Include="CasCap.Api.Azure.ServiceBus" Version="1.7.1" />
<PackageReference Include="CasCap.Api.Azure.ServiceBus" />
paket add CasCap.Api.Azure.ServiceBus --version 1.7.1
#r "nuget: CasCap.Api.Azure.ServiceBus, 1.7.1"
#:package CasCap.Api.Azure.ServiceBus@1.7.1
#addin nuget:?package=CasCap.Api.Azure.ServiceBus&version=1.7.1
#tool nuget:?package=CasCap.Api.Azure.ServiceBus&version=1.7.1
CasCap.Api.Azure.ServiceBus
Azure Service Bus queue and topic helpers for .NET applications. QueueService and TopicService
send individual messages or batches and expose synchronous message/error events while receiving.
Installation
Targets net8.0, net9.0 and net10.0.
dotnet add package CasCap.Api.Azure.ServiceBus
Usage
Supply a logger and either a connection string or a namespace and TokenCredential:
using Azure.Messaging.ServiceBus;
using CasCap.Services;
await using var queue = new QueueService(logger, namespaceName, queueName, credential);
await queue.SendMessageAsync(new ServiceBusMessage("example"), cancellationToken);
The application must provision the queue first and grant the credential send/listen access for the operations it performs. Constructors do not create queues, topics or subscriptions.
| Service | Send | Receive |
|---|---|---|
QueueService / IQueueService |
SendMessageAsync, SendMessageBatchAsync |
ReceiveMessagesAsync |
TopicService / ITopicService |
SendMessageToTopicAsync, SendMessageBatchToTopicAsync |
ReceiveMessagesFromSubscriptionAsync |
TopicService additionally requires a topic name and subscription name. Both services implement
IAsyncDisposable; dispose them after use. Receive methods run until their cancellation token is
cancelled and stop/dispose the processor on exit.
Receiving Semantics
Subscribe to MessageReceivedEvent and ErrorReceivedEvent before starting a receiver. The common
handler raises the message event and then calls CompleteMessageAsync.
These are EventHandler<T> events, not awaited asynchronous callbacks. Do not attach an
async void subscriber and assume completion waits for its work; use the Azure SDK directly when
you need explicit asynchronous processing, settlement or retry control.
Information logging includes message bodies. Configure logging so sensitive payloads cannot reach unapproved sinks. Error events include Azure SDK processing details.
Batch methods split messages into SDK-sized batches, but they dequeue entries from the supplied
Queue<ServiceBusMessage> before sending. A send failure can therefore leave the caller's queue
without the unsent entries. Preserve your own retry source, and reject individually oversized messages.
Configuration
There is no options model or DI registration helper. Supply constructor arguments from the consuming application's configuration and keep connection strings in a secret-backed provider.
Documentation
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 is compatible. 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. |
-
net10.0
- Azure.Messaging.ServiceBus (>= 7.21.0)
- CasCap.Common.Extensions (>= 4.17.0)
- CasCap.Common.Logging (>= 4.17.0)
-
net8.0
- Azure.Messaging.ServiceBus (>= 7.21.0)
- CasCap.Common.Extensions (>= 4.17.0)
- CasCap.Common.Logging (>= 4.17.0)
-
net9.0
- Azure.Messaging.ServiceBus (>= 7.21.0)
- CasCap.Common.Extensions (>= 4.17.0)
- CasCap.Common.Logging (>= 4.17.0)
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 |
|---|---|---|
| 2.1.0 | 120 | 11/14/2026 |
| 2.0.0 | 109 | 11/5/2026 |
| 1.8.0 | 115 | 11/1/2026 |
| 1.7.1 | 118 | 10/24/2026 |
| 1.7.0 | 121 | 10/21/2026 |
| 1.6.4 | 116 | 10/4/2026 |
| 1.6.3 | 127 | 9/25/2026 |
| 1.6.2 | 132 | 9/23/2026 |
| 1.6.1 | 137 | 9/21/2026 |
| 1.6.0 | 120 | 9/19/2026 |
| 1.5.5 | 136 | 9/11/2026 |
| 1.5.4 | 129 | 9/1/2026 |
| 1.5.3 | 142 | 8/18/2026 |
| 1.5.2 | 156 | 7/15/2026 |
| 1.5.1 | 152 | 6/26/2026 |
| 1.5.0 | 160 | 6/12/2026 |
| 1.4.13 | 148 | 6/10/2026 |
| 1.4.12 | 141 | 5/27/2026 |
| 1.4.11 | 153 | 5/26/2026 |
| 1.4.10 | 138 | 5/21/2026 |