Search code examples
rabbitmqappharbormasstransitcloudamqp

MassTransit throws exception "None of the specified endpoints were reachable" when using with CloudAMQP


The initialization code of MT service bus looks as follows:

var messageQueueUri = ConfigurationManager.AppSettings["messageQueueUri"];
messageQueueUri = messageQueueUri.Replace("amqp://", "rabbitmq://");

var bus = ServiceBusFactory.New(sbc =>
{
    sbc.UseNLog();
    sbc.UseRabbitMq();
    sbc.ReceiveFrom(messageQueueUri);
});

The app setting is set to:

amqp://user:[email protected]/user/my_queue"

The queue named my_queue is created in the management site in CloudAMQP.

I use MT v2.8.0 from nuget. I have tried to run this from both my local PC and AppHarbor site and both throw exception.

When I change app setting value to point it to local installation (rabbitmq://localhost/my_queue) of RabbitMQ then everything works fine.

Am I doing something wrong? Any advice would be really appreciated.

Thanks in advance.


Solution

  • I haven't used CloudAMQP but others on the list have, other have gotten it to work. This appears like it should work at first glance. I'd bring this to the mailing list and see if anyone else has pointers who's actually used CloudAMQP.