![]() |
VOOZH | about |
dotnet add package Rebus.Autofac --version 9.0.0
NuGet\Install-Package Rebus.Autofac -Version 9.0.0
<PackageReference Include="Rebus.Autofac" Version="9.0.0" />
<PackageVersion Include="Rebus.Autofac" Version="9.0.0" />Directory.Packages.props
<PackageReference Include="Rebus.Autofac" />Project file
paket add Rebus.Autofac --version 9.0.0
#r "nuget: Rebus.Autofac, 9.0.0"
#:package Rebus.Autofac@9.0.0
#addin nuget:?package=Rebus.Autofac&version=9.0.0Install as a Cake Addin
#tool nuget:?package=Rebus.Autofac&version=9.0.0Install as a Cake Tool
Provides an Autofac container adapter for Rebus.
👁 alternate text is missing from this package README image
Use the Autofac container adapter like this:
var builder = new ContainerBuilder();
builder.RegisterRebus((configurer, context) => configurer
.Logging(l => l.Serilog())
.Transport(t => t.UseRabbitMq(...))
.Options(o => {
o.SetNumberOfWorkers(2);
o.SetMaxParallelism(30);
}));
// the bus is registered now, but it has not been started.... make all your other registrations, and then:
var container = builder.Build(); //< start the bus
// now your application is running
// ALWAYS do this when your application shuts down:
container.Dispose();
It will automatically register the following services in Autofac:
IBus – this is the bus singletonIBusStarter – this is the bus starter you can use to start it manuallyIMessageContext – this is the current message context – can be injected into Rebus message handlers and everything resolved at the time of receiving a new messageISyncBus – this is the synchronous bus instance – can be used in places, where a Task-based asynchronous API is not desired, e.g. from deep within ASP.NET or WPF applications, which would deadlock if you went .Wait() on a TaskNot that if you wish to regiser the bus and not start it automatically, you can stil register the number of workers but have it not start anything until you are ready for the bus to be started. This is usefu if you wish to separate the processing of messages from the sending of messages (separate tasks, services etc). You would do it like this:
var builder = new ContainerBuilder();
builder.RegisterRebus((configurer, context) => configurer
.Logging(l => l.Serilog())
.Transport(t => t.UseRabbitMq(...))
.Options(o => {
o.SetNumberOfWorkers(2);
o.SetMaxParallelism(30);
}),
false); // <--- here we tell it not to start the bus
// the bus is registered now, but it has not been started.... make all your other registrations, and then:
var container = builder.Build();
var busStarter = container.Resolve<IBusStarter>();
busStarter.Start(); //< start the bus
// now your application is running
// ALWAYS do this when your application shuts down:
container.Dispose();
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. 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. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 was computed. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 was computed. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 3 NuGet packages that depend on Rebus.Autofac:
| Package | Downloads |
|---|---|
|
Vedaantees.Framework.Providers
Providers implementation for the framework. |
|
|
GAPD.Common.Event
Package Description |
|
|
Imget.Shared
Package Description |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 9.0.0 | 5,554,056 | 11/15/2023 |
| 9.0.0-alpha03 | 857 | 8/2/2023 |
| 9.0.0-alpha01 | 797 | 3/27/2023 |
| 8.0.0 | 763,666 | 2/3/2022 |
| 7.3.0 | 146,195 | 9/20/2021 |
| 7.2.0 | 71,912 | 2/25/2021 |
| 7.1.0 | 2,672 | 2/23/2021 |
| 7.0.0 | 195,753 | 1/31/2020 |
| 6.0.0 | 103,083 | 1/31/2020 |
| 6.0.0-b10 | 1,249 | 1/30/2020 |
| 6.0.0-b09 | 2,167 | 11/4/2019 |
| 6.0.0-b08 | 4,061 | 8/9/2019 |
| 6.0.0-b07 | 4,926 | 6/21/2019 |
| 6.0.0-b05 | 1,359 | 6/21/2019 |
| 6.0.0-b04 | 2,053 | 11/15/2018 |
| 6.0.0-b03 | 1,651 | 11/15/2018 |
| 6.0.0-b02 | 1,576 | 11/9/2018 |
| 6.0.0-b01 | 2,479 | 1/10/2018 |
| 5.2.0 | 4,469,519 | 11/14/2017 |
| 5.1.0 | 2,530 | 11/13/2017 |