rebus-org / Rebus.ServiceProvider

:bus: Microsoft Extensions Dependency Injection container adapter for Rebus
https://mookid.dk/category/rebus
Other
67 stars 34 forks source link

Upgrading from 7.x to 8.0 #65

Closed dannyyy closed 2 years ago

dannyyy commented 2 years ago

Hi,

I try to upgrade from the latest 7.x version to 8.0. Unfortunately, I'm not very sure what to do. Before, I did the typical stuff with service.AddRebus() within ConfigureServices and app.UseRebus() within Configure().

But now, the UseRebus() doesn't seem to exist anymore. Is it just obsolete, or is there a replacement? According to the documentation, StartRebus() should not be used for a typical hosted application.

I would really appreciate seeing a simple upgrade guideline to keep the current behavior. In the readme it's absolutely not clear what's new, what are edge cases, ...

mookid8000 commented 2 years ago

But now, the UseRebus() doesn't seem to exist anymore. Is it just obsolete, or is there a replacement? According to the documentation, StartRebus() should not be used for a typical hosted application.

It's because the new container adapter has tighter integration with the hosting framework, which makes

services.AddRebus(...);

sufficient. 🙂

Sorry about the confusion.