Rebus.Autofac 9.0.0

dotnet add package Rebus.Autofac --version 9.0.0
NuGet\Install-Package Rebus.Autofac -Version 9.0.0
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="Rebus.Autofac" Version="9.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Rebus.Autofac --version 9.0.0
#r "nuget: Rebus.Autofac, 9.0.0"
#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.
// Install Rebus.Autofac as a Cake Addin
#addin nuget:?package=Rebus.Autofac&version=9.0.0

// Install Rebus.Autofac as a Cake Tool
#tool nuget:?package=Rebus.Autofac&version=9.0.0

Rebus.Autofac

install from nuget

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 singleton
  • IBusStarter – this is the bus starter you can use to start it manually
  • IMessageContext – this is the current message context – can be injected into Rebus message handlers and everything resolved at the time of receiving a new message
  • ISyncBus – 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 Task

Not 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 Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed. 
.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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Rebus.Autofac:

Package Downloads
Vedaantees.Framework.Providers

Providers implementation for the framework.

GAPD.Common.Event

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
9.0.0 78,491 11/15/2023
9.0.0-alpha03 663 8/2/2023
9.0.0-alpha01 597 3/27/2023
8.0.0 567,809 2/3/2022
7.3.0 129,328 9/20/2021
7.2.0 65,200 2/25/2021
7.1.0 1,558 2/23/2021
7.0.0 171,725 1/31/2020
6.0.0 101,330 1/31/2020
6.0.0-b10 955 1/30/2020
6.0.0-b09 1,881 11/4/2019
6.0.0-b08 3,528 8/9/2019
6.0.0-b07 4,651 6/21/2019
6.0.0-b05 1,045 6/21/2019
6.0.0-b04 1,685 11/15/2018
6.0.0-b03 1,269 11/15/2018
6.0.0-b02 1,243 11/9/2018
6.0.0-b01 1,783 1/10/2018
5.2.0 1,062,074 11/14/2017
5.1.0 1,958 11/13/2017
5.0.0 2,185 11/3/2017
5.0.0-b01 1,415 10/30/2017
4.0.0 23,909 8/15/2017
4.0.0-b08 2,471 6/22/2017
4.0.0-b07 1,628 5/18/2017
4.0.0-b06 1,428 5/17/2017
4.0.0-b05 1,418 5/17/2017
4.0.0-b04 1,489 4/19/2017
4.0.0-b03 1,435 4/5/2017
4.0.0-b02 2,728 4/4/2017
4.0.0-b01 1,451 3/21/2017
3.0.0 41,111 1/5/2017
2.0.0 14,417 9/20/2016
2.0.0-b01 1,425 9/9/2016
2.0.0-a2 1,453 8/31/2016
2.0.0-a1 1,460 8/31/2016
0.99.74 3,191 8/29/2016
0.99.73 1,915 8/12/2016
0.99.72 1,871 8/4/2016
0.99.71 2,070 8/3/2016
0.99.70 1,930 7/29/2016
0.99.68 1,873 7/18/2016
0.99.67 1,909 7/1/2016
0.99.66 1,859 6/28/2016
0.99.65 1,817 6/23/2016
0.99.64 1,858 6/22/2016
0.99.63 1,789 6/21/2016
0.99.62 1,867 6/17/2016
0.99.61 1,777 6/17/2016
0.99.60 1,891 6/15/2016
0.99.59 2,039 6/3/2016
0.99.58 2,859 5/24/2016
0.99.57 1,839 5/22/2016
0.99.56 1,900 5/22/2016
0.99.55 2,032 5/16/2016
0.99.54 1,826 5/12/2016
0.99.53 1,765 5/12/2016
0.99.52 1,877 5/11/2016
0.99.51 1,843 5/9/2016
0.99.50 2,004 4/13/2016
0.99.48 1,915 4/6/2016
0.99.47 1,856 3/31/2016
0.99.46 1,812 3/30/2016
0.99.45 1,827 3/29/2016
0.99.44 1,725 3/26/2016
0.99.43 1,755 3/26/2016
0.99.42 1,991 3/22/2016
0.99.41 1,884 3/17/2016
0.99.40 1,842 3/15/2016
0.99.39 1,846 3/14/2016
0.99.38 1,815 3/9/2016
0.99.37 1,799 3/9/2016
0.99.36 1,855 3/3/2016
0.99.35 1,878 2/22/2016
0.99.34 1,876 2/19/2016
0.99.33 2,002 2/12/2016
0.99.32 1,853 2/10/2016
0.99.31 1,790 2/8/2016
0.99.30 2,267 2/5/2016
0.99.29 2,464 2/2/2016
0.99.27 1,793 1/28/2016
0.99.26 1,794 1/27/2016
0.99.25 1,885 1/22/2016
0.99.24 1,895 1/18/2016
0.99.23 1,969 12/18/2015
0.99.22 1,820 12/18/2015
0.99.21 2,012 12/11/2015
0.99.20 1,943 12/10/2015
0.99.19 1,840 12/8/2015
0.99.18 1,863 12/7/2015
0.99.17 1,799 12/7/2015
0.99.16 2,172 11/30/2015
0.99.14 1,985 11/24/2015
0.99.13 1,954 11/23/2015
0.99.12 2,025 11/17/2015
0.99.11 1,853 11/17/2015
0.99.10 2,051 11/11/2015
0.99.9 1,862 11/5/2015
0.99.8 1,910 11/5/2015
0.99.7 1,880 10/29/2015
0.99.5 2,128 10/27/2015
0.99.4 1,818 10/27/2015
0.99.2 1,990 10/12/2015
0.99.1 1,932 10/8/2015
0.99.0 2,119 10/7/2015
0.98.12 1,910 9/17/2015
0.98.11 1,941 9/17/2015
0.98.10 1,906 9/16/2015
0.98.9 1,868 9/14/2015
0.98.8 1,897 9/13/2015
0.98.7 1,923 9/9/2015
0.98.6 1,919 9/7/2015
0.98.5 1,842 9/3/2015
0.98.4 1,815 9/3/2015
0.98.3 1,885 9/1/2015
0.98.2 1,866 8/27/2015
0.98.1 1,861 8/27/2015
0.98.0 1,863 8/26/2015
0.97.0 1,828 8/25/2015
0.96.0 1,836 8/24/2015
0.95.0 1,866 8/20/2015
0.94.0 1,866 8/19/2015
0.93.0 1,867 8/19/2015
0.92.4 1,870 8/17/2015
0.92.3 2,062 8/13/2015
0.92.2 2,186 8/12/2015
0.92.1 1,998 8/12/2015
0.92.0 2,075 8/11/2015
0.91.0 1,810 8/11/2015
0.90.9 1,855 8/10/2015
0.90.8 2,184 8/9/2015
0.90.7 2,077 8/5/2015
0.90.6 2,081 8/4/2015
0.90.5 2,068 8/4/2015
0.90.4 2,040 8/2/2015
0.90.3 2,054 8/2/2015
0.90.2 1,987 7/31/2015
0.90.1 2,023 7/29/2015
0.90.0 1,998 7/29/2015
0.84.0 2,525 5/15/2015
0.83.0 2,095 4/20/2015
0.82.1 1,937 4/16/2015
0.82.0 1,975 3/18/2015
0.81.0 1,830 3/12/2015
0.80.1 2,072 3/5/2015
0.80.0 2,546 2/19/2015
0.79.0 1,852 2/6/2015
0.78.2 1,797 2/6/2015
0.78.1 1,831 2/5/2015
0.78.0 1,958 1/29/2015
0.77.1 1,878 1/23/2015
0.77.0 1,861 1/15/2015
0.76.0 1,849 1/15/2015
0.75.2 2,187 1/3/2015
0.75.1 2,270 12/21/2014
0.75.0 2,006 12/2/2014
0.74.1 2,012 12/2/2014
0.74.0 1,996 11/30/2014
0.73.0 3,162 11/6/2014
0.72.0 2,208 11/5/2014
0.71.4 2,039 10/29/2014
0.71.3 1,936 10/20/2014
0.71.2 1,850 9/30/2014
0.71.1 1,990 9/19/2014
0.71.0 1,988 8/7/2014
0.70.3 1,845 8/4/2014
0.70.2 2,299 7/31/2014
0.70.1 1,910 7/17/2014
0.69.0 2,141 6/17/2014
0.68.0 1,942 6/5/2014
0.67.0 1,955 5/20/2014
0.66.0 1,992 5/9/2014
0.65.0 2,127 4/27/2014
0.64.1 1,993 4/25/2014
0.64.0 2,112 4/20/2014
0.63.1 1,967 4/19/2014
0.63.0 1,941 3/24/2014
0.62.0 2,028 3/12/2014
0.61.1 1,961 3/5/2014
0.61.0 1,931 3/4/2014
0.60.1 1,918 3/3/2014
0.60.0 1,921 3/3/2014
0.59.0 2,043 2/26/2014
0.58.2 1,979 2/24/2014
0.58.1 1,916 2/24/2014
0.58.0 1,934 2/24/2014
0.57.0 1,937 2/18/2014
0.56.1 1,982 2/4/2014
0.56.0 1,949 1/24/2014
0.55.1 1,927 1/20/2014
0.55.0 2,003 1/20/2014
0.54.8 1,905 1/20/2014
0.54.7 1,946 1/20/2014
0.54.6 1,918 1/20/2014
0.54.5 1,939 1/20/2014
0.54.4 2,008 1/11/2014
0.54.3 1,921 1/8/2014
0.54.1 1,944 12/16/2013
0.54.0 1,930 12/10/2013
0.53.1 1,956 12/9/2013
0.53.0 1,924 12/5/2013
0.52.0 1,896 12/4/2013
0.51.1 1,947 12/3/2013
0.51.0 2,000 12/3/2013
0.50.1 1,987 11/15/2013
0.50.0 1,952 11/15/2013
0.49.0 1,975 11/15/2013
0.48.0 1,921 11/12/2013
0.47.0 1,926 11/6/2013
0.46.0 1,946 10/29/2013
0.45.0 1,905 10/21/2013
0.44.5 1,956 10/11/2013
0.44.4 1,931 10/7/2013
0.44.3 1,913 10/4/2013
0.44.2 1,937 10/4/2013
0.44.1 1,973 10/2/2013
0.44.0 1,956 10/2/2013
0.43.1 1,948 9/24/2013
0.43.0 1,940 9/17/2013
0.42.0 1,937 9/17/2013
0.41.0 2,031 9/10/2013
0.40.1 2,008 9/9/2013
0.40.0 1,968 9/2/2013
0.39.0 1,979 8/29/2013
0.38.1 1,937 8/28/2013
0.38.0 1,927 8/28/2013
0.37.0 1,931 8/26/2013
0.36.1 1,984 8/25/2013
0.36.0 2,051 8/25/2013
0.35.6 1,950 8/20/2013
0.35.5 1,956 8/20/2013
0.35.4 2,020 8/19/2013
0.35.3 1,947 8/17/2013
0.35.2 2,029 8/15/2013
0.35.1 1,962 8/14/2013
0.35.0 1,957 8/6/2013
0.34.7 1,875 8/5/2013
0.34.6 2,001 8/5/2013
0.34.5 1,945 8/2/2013
0.34.3 1,942 7/29/2013
0.34.2 1,897 7/29/2013
0.34.1 2,022 7/27/2013
0.34.0 2,210 7/4/2013
0.33.0 2,124 6/14/2013
0.32.4 1,959 5/28/2013
0.32.3 1,939 5/23/2013
0.32.1 1,977 5/15/2013
0.32.0 2,034 4/23/2013
0.31.1 1,986 4/2/2013
0.31.0 1,942 4/2/2013
0.30.7 1,990 3/25/2013
0.30.4 2,031 3/7/2013
0.30.3 1,950 3/7/2013
0.30.2 2,010 3/7/2013
0.30.1 2,005 3/6/2013
0.30.0 2,056 3/5/2013
0.29.9 2,004 3/5/2013
0.29.8 2,056 3/5/2013
0.29.7 1,992 2/28/2013
0.29.6 2,010 2/20/2013
0.29.5 2,007 2/20/2013
0.29.4 1,967 2/8/2013
0.29.3 1,970 2/6/2013
0.29.1 1,967 2/5/2013
0.29.0-alpha 1,457 1/22/2013
0.28.4 2,026 1/21/2013
0.28.3 2,043 1/8/2013
0.28.2 1,914 1/8/2013
0.28.1 1,996 12/27/2012
0.28.0 2,013 12/27/2012
0.27.1 2,029 12/4/2012
0.27.0 2,070 12/4/2012
0.26.1 2,189 12/4/2012
0.26.0 2,163 11/20/2012
0.25.9 2,270 11/20/2012
0.25.8 2,215 11/19/2012
0.25.7 2,261 11/18/2012
0.25.5 2,197 11/15/2012
0.25.3 2,205 11/13/2012
0.25.2 2,197 11/13/2012
0.25.1 2,201 11/13/2012
0.25.0 2,215 11/7/2012
0.24.9 2,139 11/7/2012
0.24.8 2,140 11/7/2012
0.24.7 2,147 11/6/2012
0.24.6 2,164 11/1/2012
0.24.5 2,191 10/30/2012
0.24.4 2,171 10/30/2012
0.24.3 2,160 10/26/2012
0.24.2 2,091 10/26/2012
0.24.1 2,112 10/26/2012
0.24.0 2,149 10/25/2012
0.23.9 2,150 10/25/2012
0.23.8 2,106 10/25/2012
0.23.7 2,119 10/25/2012
0.23.6 2,154 10/24/2012
0.23.1 2,070 10/12/2012
0.23.0 2,169 10/10/2012
0.22.8 2,079 10/10/2012
0.22.7 2,084 10/9/2012
0.22.6 2,149 10/9/2012
0.22.5 2,089 10/3/2012
0.22.4 2,032 10/2/2012
0.22.3 1,992 10/2/2012
0.22.2 2,038 9/30/2012
0.22.1 2,075 9/26/2012
0.22.0 2,100 9/26/2012
0.21.7 2,112 9/25/2012
0.21.6 2,063 9/25/2012
0.21.5 2,110 9/11/2012
0.21.4 2,120 9/10/2012
0.21.3 2,102 9/10/2012
0.21.2 2,022 9/10/2012
0.21.1 2,052 9/10/2012
0.21.0 2,005 9/7/2012
0.20.9 2,014 9/7/2012
0.20.8 2,102 9/6/2012
0.20.7 2,075 9/6/2012
0.20.6 2,101 9/6/2012
0.20.3 2,096 9/4/2012
0.20.2 2,029 9/4/2012
0.19.7 2,171 8/29/2012
0.19.6 2,082 8/28/2012
0.19.5 2,110 8/28/2012
0.19.4 2,006 8/28/2012
0.19.3 1,981 8/28/2012
0.19.2 2,056 8/28/2012
0.19.1 2,052 8/26/2012
0.18.6 2,029 8/23/2012
0.16.0 2,045 8/20/2012
0.15.9-alpha 1,600 8/14/2012
0.15.8-alpha 1,565 8/8/2012
0.15.7-alpha 1,566 8/8/2012
0.15.6-alpha 1,525 8/8/2012
0.15.5-alpha 1,609 8/8/2012
0.15.4-alpha 1,553 8/7/2012
0.15.3-alpha 1,545 8/7/2012
0.15.2-alpha 1,590 8/7/2012
0.15.1-alpha 1,564 8/2/2012
0.15.0-alpha 1,590 8/1/2012
0.14.0-alpha 1,579 7/30/2012
0.13.0-alpha 1,564 7/14/2012
0.12.9-alpha 1,681 6/18/2012
0.12.8-alpha 1,545 6/18/2012
0.12.7-alpha 1,554 6/13/2012
0.12.6-alpha 1,549 6/8/2012
0.12.5-alpha 1,572 6/5/2012
0.12.4-alpha 1,545 6/5/2012
0.12.3-alpha 1,532 6/1/2012
0.12.2-alpha 1,568 5/31/2012
0.12.1-alpha 1,561 5/30/2012
0.11.10-alpha 1,592 5/30/2012
0.11.9-alpha 1,515 5/30/2012
0.11.8-alpha 1,521 5/30/2012
0.11.7-alpha 1,585 5/30/2012
0.11.6-alpha 1,538 5/29/2012
0.11.5-alpha 1,561 5/22/2012
0.11.4-alpha 1,572 5/22/2012