DEV Community

Discussion on: .NET Core – Running Background Worker on IIS

Collapse
 
ankitvijay profile image
Ankit Vijay • Edited

Hi John, We have wrapped RabbitMQ implementation with a popular library Rebus.

Rebus provides a great abstraction over RabbitMQ and takes away all the complexities. See the sample here:
github.com/rebus-org/Rebus.Service...

This effectively means we do not need to implement IHostedService ourselves. The other advantage of using Rebus for us was that it makes the implementation very generic and in future we can easily migrate our solution to any other service provider if we choose to move to cloud.

Collapse
 
seankearon profile image
seankearon

I'm late to the party here, but I agree with Ankit that Rebus is a great way to work with RabbitMQ. My blog has an article about how to use Rebus in C# here

seankearon.me/posts/2020/12/rebus-...

Or in F# too, if you prefer:

seankearon.me/posts/2020/12/rebus-...