CasCap.Api.Azure.ServiceBus
1.4.12
Prefix Reserved
dotnet add package CasCap.Api.Azure.ServiceBus --version 1.4.12
NuGet\Install-Package CasCap.Api.Azure.ServiceBus -Version 1.4.12
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="CasCap.Api.Azure.ServiceBus" Version="1.4.12" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CasCap.Api.Azure.ServiceBus" Version="1.4.12" />
<PackageReference Include="CasCap.Api.Azure.ServiceBus" />
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 CasCap.Api.Azure.ServiceBus --version 1.4.12
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CasCap.Api.Azure.ServiceBus, 1.4.12"
#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 CasCap.Api.Azure.ServiceBus@1.4.12
#: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=CasCap.Api.Azure.ServiceBus&version=1.4.12
#tool nuget:?package=CasCap.Api.Azure.ServiceBus&version=1.4.12
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CasCap.Api.Azure.ServiceBus
Helper library for Azure Service Bus. Provides base service classes for queue and topic send/receive operations with event-driven message handling.
Installation
dotnet add package CasCap.Api.Azure.ServiceBus
Services / Extensions
| Type | Name | Description |
|---|---|---|
| Interface | IQueueService |
Abstraction for Service Bus queue send and receive operations. |
| Interface | ITopicService |
Abstraction for Service Bus topic send and receive operations. |
| Service | ServiceBase |
Abstract base class providing common message and error event handling (MessageReceivedEvent, ErrorReceivedEvent). |
| Service | QueueService |
Implements IQueueService. Sends single messages, batches, and receives from queues. Supports connection string and TokenCredential authentication. |
| Service | TopicService |
Implements ITopicService. Sends single messages, batches, and receives from topics/subscriptions. Supports connection string and TokenCredential authentication. |
Key Methods — QueueService
SendMessageAsync(ServiceBusMessage)— Sends a single message to the queue.SendMessageBatchAsync(Queue<ServiceBusMessage>, CancellationToken)— Sends a batch of messages.ReceiveMessagesAsync(CancellationToken)— Receives and processes messages from the queue.
Key Methods — TopicService
SendMessageToTopicAsync(ServiceBusMessage, CancellationToken)— Sends a single message to the topic.SendMessageBatchToTopicAsync(Queue<ServiceBusMessage>, CancellationToken)— Sends a batch of messages.ReceiveFromSubscriptionAsync(CancellationToken)— Receives and processes messages from a subscription.
Class Hierarchy
Queue and Topic service abstraction for Azure Service Bus:
classDiagram
direction TB
ServiceBase <|-- QueueService
ServiceBase <|-- TopicService
IQueueService <|.. QueueService
ITopicService <|.. TopicService
class ServiceBase {
<<abstract>>
#ILogger Logger
+event MessageReceivedEvent
+event ErrorReceivedEvent
#OnMessageReceived(args) void
#OnErrorReceived(args) void
}
class IQueueService {
<<interface>>
+SendMessageAsync(message) Task
+SendMessageBatchAsync(messages, token) Task
+ReceiveMessagesAsync(token) Task
}
class QueueService {
-ServiceBusClient Client
-ServiceBusSender Sender
-ServiceBusProcessor Processor
+SendMessageAsync(message) Task
+SendMessageBatchAsync(messages, token) Task
+ReceiveMessagesAsync(token) Task
}
class ITopicService {
<<interface>>
+SendMessageToTopicAsync(message, token) Task
+SendMessageBatchToTopicAsync(messages, token) Task
+ReceiveFromSubscriptionAsync(token) Task
}
class TopicService {
-ServiceBusClient Client
-ServiceBusSender Sender
-ServiceBusProcessor Processor
+SendMessageToTopicAsync(message, token) Task
+SendMessageBatchToTopicAsync(messages, token) Task
+ReceiveFromSubscriptionAsync(token) Task
}
QueueService ..> ServiceBusClient : uses
TopicService ..> ServiceBusClient : uses
QueueService ..> ServiceBusSender : uses
TopicService ..> ServiceBusSender : uses
QueueService ..> ServiceBusProcessor : uses
TopicService ..> ServiceBusProcessor : uses
Usage Pattern:
- Instantiate
QueueServicefor queue operations orTopicServicefor topic/subscription operations - Subscribe to
MessageReceivedEventfor incoming messages - Subscribe to
ErrorReceivedEventfor error handling - Use
SendMessageAsync/SendMessageBatchAsyncfor sending - Use
ReceiveMessagesAsync/ReceiveFromSubscriptionAsyncto start listening
Configuration
No configuration model. Services are constructed directly with connection strings or TokenCredential.
Dependencies
NuGet Packages
| Package |
|---|
| Azure.Messaging.ServiceBus |
| CasCap.Common.Logging |
| CasCap.Common.Extensions |
Project References
None.
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Azure.Messaging.ServiceBus (>= 7.20.1)
- CasCap.Common.Extensions (>= 4.11.8)
- CasCap.Common.Logging (>= 4.11.8)
-
net8.0
- Azure.Messaging.ServiceBus (>= 7.20.1)
- CasCap.Common.Extensions (>= 4.11.8)
- CasCap.Common.Logging (>= 4.11.8)
-
net9.0
- Azure.Messaging.ServiceBus (>= 7.20.1)
- CasCap.Common.Extensions (>= 4.11.8)
- CasCap.Common.Logging (>= 4.11.8)
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.4.12 | 43 | 5/27/2026 |
| 1.4.11 | 47 | 5/26/2026 |
| 1.4.10 | 96 | 5/21/2026 |
| 1.4.9 | 86 | 5/20/2026 |
| 1.4.8 | 99 | 5/13/2026 |
| 1.4.7 | 115 | 5/8/2026 |
| 1.4.6 | 103 | 5/4/2026 |
| 1.4.5 | 98 | 5/4/2026 |
| 1.4.4 | 108 | 4/23/2026 |
| 1.4.3 | 112 | 4/17/2026 |
| 1.4.2 | 104 | 4/16/2026 |
| 1.4.1 | 109 | 4/15/2026 |
| 1.4.0 | 114 | 4/1/2026 |
| 1.3.1 | 133 | 3/13/2026 |
| 1.3.0 | 132 | 3/11/2026 |
| 1.2.5 | 112 | 2/12/2026 |
| 1.2.4 | 125 | 2/2/2026 |
| 1.2.3 | 121 | 1/26/2026 |
| 1.2.2 | 451 | 12/11/2025 |
| 1.2.1 | 319 | 11/12/2025 |
Loading failed