Shuttle.Esb
13.2.1
dotnet add package Shuttle.Esb --version 13.2.1
NuGet\Install-Package Shuttle.Esb -Version 13.2.1
<PackageReference Include="Shuttle.Esb" Version="13.2.1" />
paket add Shuttle.Esb --version 13.2.1
#r "nuget: Shuttle.Esb, 13.2.1"
// Install Shuttle.Esb as a Cake Addin
#addin nuget:?package=Shuttle.Esb&version=13.2.1
// Install Shuttle.Esb as a Cake Tool
#tool nuget:?package=Shuttle.Esb&version=13.2.1
Documentation
Please visit out official documentation for more information.
Getting Started
Start a new Console Application project and select a Shuttle.Esb queue implementation from the supported queues:
PM> Install-Package Shuttle.Esb.AzureStorageQueues
We'll also make use of the .NET generic host:
PM> Install-Package Microsoft.Extensions.Hosting
Next we'll implement our endpoint in order to start listening on our queue:
internal class Program
{
private static void Main()
{
Host.CreateDefaultBuilder()
.ConfigureServices(services =>
{
services.AddServiceBus(builder =>
{
builder.Options.Inbox.WorkQueueUri = "azuresq://azure/work";
});
services.AddAzureStorageQueues(builder =>
{
builder.AddOptions("azure", new AzureStorageQueueOptions
{
ConnectionString = "UseDevelopmentStorage=true;"
});
});
})
.Build()
.Run();
}
}
Even though the options may be set directly as above, typically one would make use of a configuration provider:
internal class Program
{
private static void Main()
{
Host.CreateDefaultBuilder()
.ConfigureServices(services =>
{
var configuration =
new ConfigurationBuilder()
.AddJsonFile("appsettings.json")
.Build();
services.AddSingleton<IConfiguration>(configuration);
services.AddServiceBus(builder =>
{
configuration
.GetSection(ServiceBusOptions.SectionName)
.Bind(builder.Options);
});
services.AddAzureStorageQueues(builder =>
{
builder.AddOptions("azure", new AzureStorageQueueOptions
{
ConnectionString = configuration
.GetConnectionString("azure")
});
});
})
.Build()
.Run();
}
}
The appsettings.json
file would be as follows:
{
"ConnectionStrings": {
"azure": "UseDevelopmentStorage=true;"
},
"Shuttle": {
"ServiceBus": {
"Inbox": {
"WorkQueueUri": "azuresq://azure/work",
}
}
}
}
Send a command message for processing
bus.Send(new RegisterMember
{
UserName = "user-name",
EMailAddress = "user@domain.com"
});
Publish an event message when something interesting happens
Before publishing an event one would need to register an ISubscrtiptionService
implementation such as Shuttle.Esb.Sql.Subscription.
bus.Publish(new MemberRegistered
{
UserName = "user-name"
});
Subscribe to those interesting events
services.AddServiceBus(builder =>
{
builder.AddSubscription<MemberRegistered>();
});
Handle any messages
public class RegisterMemberHandler : IMessageHandler<RegisterMember>
{
public RegisterMemberHandler(IDependency dependency)
{
}
public void ProcessMessage(IHandlerContext<RegisterMember> context)
{
// perform member registration
context.Publish(new MemberRegistered
{
UserName = context.Message.UserName
});
}
}
public class MemberRegisteredHandler : IMessageHandler<MemberRegistered>
{
public void ProcessMessage(IHandlerContext<MemberRegistered> context)
{
// processing
}
}
Product | Versions |
---|---|
.NET | net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows |
.NET Core | netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1 |
.NET Standard | netstandard2.0 netstandard2.1 |
.NET Framework | net461 net462 net463 net47 net471 net472 net48 net481 |
MonoAndroid | monoandroid |
MonoMac | monomac |
MonoTouch | monotouch |
Tizen | tizen40 tizen60 |
Xamarin.iOS | xamarinios |
Xamarin.Mac | xamarinmac |
Xamarin.TVOS | xamarintvos |
Xamarin.WatchOS | xamarinwatchos |
-
- Microsoft.Extensions.DependencyInjection (>= 7.0.0)
- Microsoft.Extensions.Hosting (>= 7.0.0)
- Shuttle.Core.Compression (>= 11.0.1)
- Shuttle.Core.Encryption (>= 11.0.1)
- Shuttle.Core.Pipelines (>= 12.1.1)
- Shuttle.Core.PipelineTransaction (>= 11.0.1)
- Shuttle.Core.Reflection (>= 12.0.1)
- Shuttle.Core.Serialization (>= 10.0.7)
- Shuttle.Core.Specification (>= 11.0.0)
- Shuttle.Core.Streams (>= 10.1.1)
- Shuttle.Core.System (>= 11.0.3)
- Shuttle.Core.Threading (>= 12.0.1)
- Shuttle.Core.Transactions (>= 11.0.1)
NuGet packages (23)
Showing the top 5 NuGet packages that depend on Shuttle.Esb:
Package | Downloads |
---|---|
Shuttle.Esb.RabbitMQ
RabbitMQ implementation for use with Shuttle.Esb. |
|
Shuttle.Esb.Tests
Test fixtures to facilitate testing of components, such as queues, that relate to Shuttle.Esb. |
|
Shuttle.Esb.Sql.Subscription
Sql-based implementation of ISubscriptionManager interface for use with Shuttle.Esb. |
|
Shuttle.Esb.FileMQ
File-based queue implementation for use with Shuttle.Esb. |
|
Shuttle.Esb.Msmq
MSMQ implementation for use with Shuttle.Esb. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
13.2.1 | 1,502 | 12/1/2022 |
13.2.0 | 3,084 | 9/16/2022 |
13.1.0 | 2,864 | 9/11/2022 |
13.0.0 | 2,804 | 9/4/2022 |
12.1.1 | 380 | 5/18/2022 |
12.1.0 | 252 | 5/18/2022 |
12.0.1 | 3,722 | 4/9/2022 |
12.0.0 | 3,485 | 3/21/2022 |
11.2.0 | 5,099 | 2/15/2021 |
11.1.1 | 387 | 2/9/2021 |
11.1.0 | 508 | 1/30/2021 |
11.0.3 | 7,293 | 1/17/2021 |
11.0.2 | 572 | 11/27/2020 |
11.0.1 | 7,355 | 7/31/2019 |
11.0.0 | 6,335 | 6/20/2019 |
10.1.8 | 1,248 | 12/26/2018 |
10.1.7 | 738 | 12/9/2018 |
10.1.6 | 28,067 | 10/15/2018 |
10.1.4 | 704 | 10/13/2018 |
10.1.2 | 1,449 | 10/6/2018 |
10.1.1 | 1,669 | 9/19/2018 |
10.1.0 | 1,072 | 9/17/2018 |
10.0.10 | 1,998 | 7/10/2018 |
10.0.9 | 943 | 7/8/2018 |
10.0.7 | 935 | 4/22/2018 |
10.0.6 | 1,252 | 4/12/2018 |
10.0.5 | 1,692 | 4/8/2018 |
10.0.3 | 3,874 | 2/13/2018 |
9.1.4 | 1,302 | 12/29/2017 |
9.1.3 | 909 | 10/22/2017 |
9.0.3 | 955 | 8/26/2017 |
9.0.2 | 1,841 | 8/6/2017 |
8.0.14 | 1,143 | 3/23/2018 |
8.0.13 | 3,115 | 12/29/2017 |
8.0.12 | 1,089 | 7/20/2017 |
8.0.11 | 904 | 7/17/2017 |
8.0.9 | 909 | 7/14/2017 |
8.0.8 | 1,366 | 7/6/2017 |
8.0.7 | 2,447 | 5/15/2017 |
8.0.5 | 1,110 | 5/7/2017 |
8.0.4 | 905 | 5/6/2017 |
8.0.3 | 1,078 | 5/6/2017 |
8.0.1 | 1,089 | 4/23/2017 |
8.0.0 | 3,527 | 3/24/2017 |
7.0.4 | 2,006 | 10/26/2016 |
7.0.3 | 1,293 | 10/4/2016 |
7.0.1 | 1,761 | 9/19/2016 |
7.0.0 | 1,025 | 9/4/2016 |
6.2.1 | 1,407 | 7/26/2016 |
6.2.0 | 1,190 | 7/23/2016 |
6.1.3 | 1,244 | 6/6/2016 |
6.1.2 | 1,019 | 6/4/2016 |
6.1.1 | 2,438 | 6/4/2016 |
6.1.0 | 1,129 | 6/4/2016 |
6.0.0 | 3,177 | 4/24/2016 |
5.1.9 | 1,950 | 4/3/2016 |
5.1.6 | 2,933 | 3/21/2016 |