Search code examples
c#rabbitmqmasstransitbus

MassTransit RabbitMq bus attempts to start multiple times


I upgraded MassTransit from v7 to v8 and I am getting some new log messages and want to make sure nothing serious is happening. When I start up my console apps (either together or individually) I get the following:

[10:01:54 WRN] Start called, but the host was already started: rabbitmq://localhost/ (Already Started)
[10:01:55 INF] Bus started: rabbitmq://localhost/
[10:01:55 INF] Bus started: rabbitmq://localhost/

I'm not sure if this is an issue. In my Program.cs file, I am only adding that bus once and then I add that to a HostBuilder and run is once. So I can't understand why the bus is attempting to start again.

As far as I can tell, messages are being handled as expected and I don't see any leaks, but I want to make sure that I'm not introducing any memory or message leaks due to this issue. I wasn't getting these messages before upgrading, so I don't know if the upgrade was what caused this issue or not.


Solution

  • You might review the upgrade guide and make sure you don't have any deprecated assemblies or are otherwise starting the bus yourself when the MassTransit hosted service already does it for you.