سؤال

I am trying to get nservicebus working with appharbor and thought that rabbitmq would be good since there is an addin that I could use. However I can't seem to figure out how to actually get nservicebus to use the rabbitmq provided. I have added the following to my web.config

    <add name="NServiceBus/Transport" connectionString="host=lemur.cloudamqp.com;user=useridhere;pass=blahblahblah"/>

In global.asax.cs I have the following

_bus = Configure.With()
            .DefaultBuilder()
            .XmlSerializer()
            .UseTransport<RabbitMQ>()
            .UnicastBus()
            .CreateBus()
            .Start(() => Configure.Instance.ForInstallationOn<NServiceBus.Installation.Environments.Windows>().Install());

When this runs I get "Rabbit server is not connected."

The samples have very simple connection strings so I am not sure what my connection string should look like.

Am I doing something wrong or is this impossible?

هل كانت مفيدة؟

المحلول

Ok so I figured this out after looking a bit at the code and the requirements for amqp URI and it should break down into the following format

amqp://username:password@host/virtualhost

My username and virtualhost were the same.

Next up is the nservicebus connection string. I ended up with something similiar to

    <add name="NServiceBus/Transport" connectionString="host={host};username={username};password={password};virtualhost={virtualhost}"/>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top