Closed Maxwe11 closed 6 years ago
The Rebus/Autofac integration is made so that it initializes and starts the bus when you call containerBuilder.Build()
.
If you want to delay the time of when Rebus starts receiving messages, you can initialize it with zero workers
.Options(o => {
o.SetNumberOfWorkers(0);
})
and then start receiving messages some time later by calling
bus.Advanced.Workers.SetNumberOfWorkers(2);
but I am not sure I understand what you are asking about, actually 😐 maybe you can clarify a bit, I am not really accustomed to ASP.NET Core yet....
Hi @Maxwe11 , did you figure it out?
@mookid8000 I will prepare sample with repro of the problem in a couple of days.
(please let me know if you still have a problem)
Not anymore, Rebus.ServiceProvider
do the trick.
super 😄 good to hear 👍
Hello guys, One of the common scenario for ASP .NET Core application is registering all dependencies in
ConfigureServices
method and applying DB migrations inConfigure
method inStartup
class. In case of using SQL based transport for messages, database may not exist on the moment of container build up. WhyRebus.Autofac
decides when to start up the bus?