Setup:
- Masstransit verion: 2.10
- RabbitMq Client: 3.4.3.0
- RabbitMq Server : 3.5.3 (used default ports and configurations)
- Erlang 17.5
I can access the RabbitMQ web management client and able use the rabbitMQ locally. The problem is deployed in data center.
the code:
ServiceBusFactory.New(sbc =>
{
sbc.UseRabbitMq(r => r.ConfigureHost(new Uri("rabbitmq://actual-server-name/queue-name"), h =>
{
h.SetUsername("username");
h.SetPassword("password");
}));
sbc.ReceiveFrom("rabbitmq://actual-server-name/queue-name");
sbc.Subscribe(x => x.LoadFrom(container));
});
I got an exception error: It came from MassTransit.Exceptions.MassTransitException. When you dig down inside it from RabbitMQ itself.
RabbitMQ.Client.Exceptions.BrokerUnreachableException : None of the specified endpoints were reacheable.
System.IO.Exception : connection.start was never received, likely to a network timeout. found in Masstransit.ServiceContainer.cs line: 63
Why it throwing error; since the rabbitmq server installation is same in my local setting? permission issue? firewall issue?
I observed and verified in my testing; masstransit does not allow creating of vhost from uri input. RabbitMQ will throw most likely the same error.
To resolve this issue, create the vhost and queue manually in rabbitmq server.
PS. I knew, this is not the same as the question ask.