laget.Azure.ServiceBus
2.1.42
Prefix Reserved
See the version list below for details.
dotnet add package laget.Azure.ServiceBus --version 2.1.42
NuGet\Install-Package laget.Azure.ServiceBus -Version 2.1.42
<PackageReference Include="laget.Azure.ServiceBus" Version="2.1.42" />
paket add laget.Azure.ServiceBus --version 2.1.42
#r "nuget: laget.Azure.ServiceBus, 2.1.42"
// Install laget.Azure.ServiceBus as a Cake Addin #addin nuget:?package=laget.Azure.ServiceBus&version=2.1.42 // Install laget.Azure.ServiceBus as a Cake Tool #tool nuget:?package=laget.Azure.ServiceBus&version=2.1.42
laget.Azure.ServiceBus
A generic implementation of Microsoft.Azure.ServiceBus, the next generation Azure Service Bus .NET Standard client library that focuses on queues & topics. For more information about Service Bus...
Usage
Azure Service Bus supports reliable message queuing and durable publish/subscribe messaging. The messaging entities that form the core of the messaging capabilities in Service Bus are queues, topics and subscriptions.
Topics
A queue allows processing of a message by a single consumer. In contrast to queues, topics and subscriptions provide a one-to-many form of communication in a publish and subscribe pattern. It's useful for scaling to large numbers of recipients. Each published message is made available to each subscription registered with the topic. Publisher sends a message to a topic and one or more subscribers receive a copy of the message.
TopicSender
public class SomeClass
{
readonly TopicSender _sender;
public SomeClass(IConfiguration configuration)
{
_sender = new TopicSender(
configuration.GetConnectionString("AzureServiceBus"),
new TopicOptions
{
TopicName = "topic"
});
}
public async Task SendAsync(Models.Event @event)
{
await _sender.SendAsync(@event);
}
}
We're supporting large messages by persisting the message data as
blob
in aAzure Storage Account
.
public class SomeClass
{
readonly TopicSender _sender;
public SomeClass(IConfiguration configuration)
{
_sender = new TopicSender(
configuration.GetConnectionString("AzureStorageAccount"),
configuration.GetValue<string>("AzureStorageAccount:BlobContainerName"),
configuration.GetConnectionString("AzureServiceBus"),
new TopicOptions
{
TopicName = "topic"
});
}
public async Task SendAsync(Models.Event @event)
{
await _sender.SendAsync(@event);
}
}
TopicReceiver
public class SomeClass : IHostedService
{
readonly TopicReceiver _receiver;
public SomeClass(IConfiguration configuration)
{
_receiver = new TopicReceiver(
configuration.GetConnectionString("AzureServiceBus"),
new TopicOptions
{
TopicName = "topic",
SubscriptionName = "subscription"
});
}
public async Task StartAsync(CancellationToken ct)
{
await _receiver.RegisterAsync(MessageHandler, ErrorHandler);
}
public Task StopAsync(CancellationToken ct)
{
return Task.CompletedTask;
}
private async Task MessageHandler(ProcessMessageEventArgs args, ServiceBusMessage message)
{
var model = message.Deserialize<Models.Message>();
return Task.CompletedTask;
}
private static Task ErrorHandler(ProcessErrorEventArgs args)
{
return Task.CompletedTask;
}
}
We're supporting large messages by persisting the message data as
blob
in aAzure Storage Account
.
public class SomeClass : IHostedService
{
readonly TopicReceiver _receiver;
public SomeClass(IConfiguration configuration)
{
_receiver = new TopicReceiver(
configuration.GetConnectionString("AzureStorageAccount"),
configuration.GetValue<string>("AzureStorageAccount:BlobContainerName"),
configuration.GetConnectionString("AzureServiceBus"),
new TopicOptions
{
TopicName = "topic",
SubscriptionName = "subscription"
});
}
public async Task StartAsync(CancellationToken ct)
{
await _receiver.RegisterAsync(MessageHandler, ErrorHandler);
}
public Task StopAsync(CancellationToken ct)
{
return Task.CompletedTask;
}
private async Task MessageHandler(ProcessMessageEventArgs args, ServiceBusMessage message)
{
var model = message.Deserialize<Models.Message>();
return Task.CompletedTask;
}
private static Task ErrorHandler(ProcessErrorEventArgs args)
{
return Task.CompletedTask;
}
}
Queues
Queues offer First In, First Out (FIFO) message delivery to one or more competing consumers. That is, receivers typically receive and process messages in the order in which they were added to the queue. And, only one message consumer receives and processes each message.
QueueSender
public class SomeClass
{
readonly QueueSender _sender;
public SomeClass(IConfiguration configuration)
{
_sender = new QueueSender(configuration.GetConnectionString("AzureServiceBus"),
new TopicOptions
{
QueueName = "queue"
});
}
public async Task SendAsync(Models.Event @event)
{
await _sender.SendAsync(@event);
}
}
We're supporting large messages by persisting the message data as
blob
in aAzure Storage Account
.
public class SomeClass
{
readonly QueueSender _sender;
public SomeClass(IConfiguration configuration)
{
_sender = new QueueSender(
configuration.GetConnectionString("AzureStorageAccount"),
configuration.GetValue<string>("AzureStorageAccount:BlobContainerName"),
configuration.GetConnectionString("AzureServiceBus"),
new TopicOptions
{
QueueName = "queue"
});
}
public async Task SendAsync(Models.Event @event)
{
await _sender.SendAsync(@event);
}
}
QueueReceiver
public class SomeClass : IHostedService
{
readonly QueueReceiver _receiver;
public SomeClass(IConfiguration configuration)
{
_receiver = new QueueReceiver(
configuration.GetConnectionString("AzureServiceBus"),
new QueueReceiver
{
QueueName = "queue"
});
}
public async Task StartAsync(CancellationToken ct)
{
await _receiver.RegisterAsync(MessageHandler, ErrorHandler);
}
public Task StopAsync(CancellationToken ct)
{
return Task.CompletedTask;
}
private async Task MessageHandler(ProcessMessageEventArgs args, ServiceBusMessage message)
{
var model = message.Deserialize<Models.Message>();
return Task.CompletedTask;
}
private static Task ErrorHandler(ProcessErrorEventArgs args)
{
return Task.CompletedTask;
}
}
We're supporting large messages by persisting the message data as
blob
in aAzure Storage Account
.
public class SomeClass : IHostedService
{
readonly QueueReceiver _receiver;
public SomeClass(IConfiguration configuration)
{
_receiver = new QueueReceiver(
configuration.GetConnectionString("AzureStorageAccount"),
configuration.GetValue<string>("AzureStorageAccount:BlobContainerName"),
configuration.GetConnectionString("AzureServiceBus"),
new QueueReceiver
{
QueueName = "queue"
});
}
public async Task StartAsync(CancellationToken ct)
{
await _receiver.RegisterAsync(MessageHandler, ErrorHandler);
}
public Task StopAsync(CancellationToken ct)
{
return Task.CompletedTask;
}
private async Task MessageHandler(ProcessMessageEventArgs args, ServiceBusMessage message)
{
var model = message.Deserialize<Models.Message>();
return Task.CompletedTask;
}
private static Task ErrorHandler(ProcessErrorEventArgs args)
{
return Task.CompletedTask;
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. 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 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Azure.Messaging.ServiceBus (>= 7.16.1)
- Azure.Storage.Blobs (>= 12.18.0)
- Newtonsoft.Json (>= 13.0.3)
-
.NETStandard 2.1
- Azure.Messaging.ServiceBus (>= 7.16.1)
- Azure.Storage.Blobs (>= 12.18.0)
- Newtonsoft.Json (>= 13.0.3)
-
net6.0
- Azure.Messaging.ServiceBus (>= 7.16.1)
- Azure.Storage.Blobs (>= 12.18.0)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on laget.Azure.ServiceBus:
Package | Downloads |
---|---|
laget.Auditing
A simple framework to audit entities in .NET and .NET Core... |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
2.2.55 | 95 | 10/22/2024 | |
2.2.54 | 261 | 9/3/2024 | |
2.2.53 | 173 | 6/3/2024 | |
2.2.52 | 215 | 5/6/2024 | |
2.2.51 | 169 | 4/5/2024 | |
2.2.50 | 357 | 3/4/2024 | |
2.2.49 | 356 | 1/20/2024 | |
2.2.48 | 425 | 12/6/2023 | |
2.2.47 | 189 | 11/22/2023 | |
2.2.46 | 140 | 11/7/2023 | |
2.2.45 | 172 | 11/6/2023 | |
2.2.44 | 263 | 10/20/2023 | |
2.1.42 | 305 | 10/6/2023 | |
1.1.40 | 282 | 10/2/2023 | |
1.1.39 | 218 | 9/4/2023 | |
1.1.38 | 237 | 7/3/2023 | |
1.1.35 | 317 | 5/15/2023 | |
1.1.34 | 216 | 4/13/2023 | |
1.1.32 | 266 | 4/13/2023 | |
1.1.31 | 444 | 4/3/2023 | |
1.1.27 | 262 | 3/10/2023 | |
1.1.26 | 672 | 3/6/2023 | |
1.1.22 | 764 | 12/5/2022 | |
1.1.21 | 652 | 11/7/2022 | |
1.1.19 | 1,109 | 9/5/2022 | |
1.1.17 | 900 | 7/15/2022 | |
1.1.16 | 1,637 | 6/7/2022 | |
1.1.15 | 922 | 5/3/2022 | |
1.1.14 | 2,035 | 4/4/2022 | |
1.1.13 | 566 | 4/4/2022 | |
1.1.12 | 584 | 4/4/2022 | |
1.1.11 | 638 | 3/7/2022 | |
1.1.10 | 453 | 12/21/2021 | |
1.1.8 | 2,395 | 11/28/2021 | |
1.1.6 | 3,970 | 8/16/2021 | |
1.1.5 | 866 | 6/11/2021 | |
1.1.4 | 1,083 | 6/7/2021 | |
1.1.3 | 2,169 | 5/27/2021 | |
1.1.1 | 451 | 5/21/2021 | |
1.0.18 | 568 | 5/3/2021 | |
1.0.17 | 505 | 4/6/2021 | |
1.0.16 | 464 | 3/10/2021 | |
1.0.15 | 524 | 3/5/2021 | |
1.0.14 | 2,425 | 2/1/2021 | |
1.0.13 | 1,042 | 1/15/2021 | |
1.0.12 | 644 | 1/8/2021 | |
1.0.11 | 608 | 1/2/2021 | |
1.0.10 | 587 | 12/23/2020 | |
1.0.8 | 540 | 12/22/2020 | |
1.0.7 | 1,733 | 12/16/2020 | |
1.0.6 | 547 | 12/9/2020 | |
1.0.5 | 592 | 12/9/2020 |