Closed tgrieger-sf closed 2 years ago
I found a two answers:
app.ApplicationServices.UseRebus();
to the Configure method in Startup. That's what was in an earlier version of the WebApp sample (it's been renamed to StartRebus
in the beta version).You are right about (1) and (2) above. Thanks for posting it here 🙂
BUT there's a small caveat: In versions >= 8 it's only necessary to call the StartRebus
extension method if you are outside of the generic host!
Versions >= 8 rely on BackgroundService
to start, and so it hooks into the normal startup/shutdown phases of the host.
Got it, thanks for the extra info!
I've been trying to get a simple POC of Rebus using this package up and running and have been unable to. I pulled the repo down and ran the Sample.WebApp project and it worked successfully. I copied out that project, changed the framework to net5.0, and added the Rebus 6.6.4 and Rebus.ServiceProvider 7.0.0 (I also tried 6.4.1) nuget packages and it no longer worked. Messages are sent correctly but they are never getting picked up by the handler. Any help would be greatly appreciated.
It's also worth noting that I updated the sample project to net5.0 in cloned repo and that still worked.
Here is the log from the copied project: