Why is it not recommended to host receive endpoints in a web application using MassTransit?

Viewed 627

I am working on an ASP.NET MVC 5 application (based on nopCommerce). I want to use MassTransit to communicate with another application that is used for inventory management, billing, etc. It would be easier if I could add receive endpoints directly into the web application and not have to create a Windows service for that. But the MassTransit documentation says it is not recommended and there is no explanation as to why that is.

MassTransit in a web application

Configuring a bus in a web site is typically done to publish events, send commands, as well as engage in request/response conversations. Hosting receive endpoints and persistent consumers is not recommended (use a service as shown above).

Does anyone know the reasoning behind it? Is it not safe to add receive endpoints in a web application? Will they not work properly?

1 Answers
Related