Re: [masstransit-discuss] masstransit - rabbitmq 101

544 views
Skip to first unread message

Fawad Halim

unread,
Jun 26, 2012, 4:16:19 PM6/26/12
to masstrans...@googlegroups.com
The rabbitmq url seems incorrect. Try rabbitmq://baskint:mypass@localhost/MyQueue instead.

-fawad

On Tue, Jun 26, 2012 at 2:54 PM, Baskin Tapkan <bas...@gmail.com> wrote:
Well, just started with RabbitMQ and MassTransit. Right now having a hard time finding the "rabbitmq" instance on the local host. I took the example of "Show me the Code" and make it work with RabbitMQ. I am not getting anywhere. What is the correct syntax and what am I missing? I ran into this on a web search since I could not find another connection string that works.


I can publish/subscribe to RabbitMQ server running on this localhost using the RabbitMQ.Client library. However, no connectivity from MassTransit samp[le .Attached is the error message from the VS2010 IDE



Any suggestions and tips will be appreciated.

Thanks everyone!

Baskin

Error details: 

MassTransit.Exceptions.ConfigurationException was unhandled
  Message=The receive endpoint URI is invalid: rabbitmq://baskint@mypass:localhost/MyQueue
  Source=MassTransit
  StackTrace:
       at MassTransit.Util.UriExtensions.ToUri(String uriString, String message) in d:\BuildAgent-03\work\8d1373c869590c5b\src\MassTransit\Util\UriExtensions.cs:line 52
       at MassTransit.ServiceBusConfiguratorExtensions.ReceiveFrom(ServiceBusConfigurator configurator, String uriString) in d:\BuildAgent-03\work\8d1373c869590c5b\src\MassTransit\Configuration\ServiceBusConfiguratorExtensions.cs:line 27
       at masstransit_board_producer.Program.<Main>b__1(ServiceBusConfigurator sbc) in C:\src\dotNet\masstransit_board_producer\masstransit_board_producer\Program.cs:line 20
       at MassTransit.Bus.<>c__DisplayClass1.<Initialize>b__0(ServiceBusConfigurator configurator) in d:\BuildAgent-03\work\8d1373c869590c5b\src\MassTransit\Bus.cs:line 63
       at MassTransit.ServiceBusFactory.New(Action`1 configure) in d:\BuildAgent-03\work\8d1373c869590c5b\src\MassTransit\Configuration\ServiceBusFactory.cs:line 38
       at MassTransit.Bus.Initialize(Action`1 configure) in d:\BuildAgent-03\work\8d1373c869590c5b\src\MassTransit\Bus.cs:line 59
       at masstransit_board_producer.Program.Main(String[] args) in C:\src\dotNet\masstransit_board_producer\masstransit_board_producer\Program.cs:line 16
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.UriFormatException
       Message=Invalid URI: Invalid port specified.
       Source=System
       StackTrace:
            at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
            at System.Uri..ctor(String uriString)
            at MassTransit.Util.UriExtensions.ToUri(String uriString, String message) in d:\BuildAgent-03\work\8d1373c869590c5b\src\MassTransit\Util\UriExtensions.cs:line 48
       InnerException: 

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/masstransit-discuss/-/rT09esUYEBYJ.
To post to this group, send email to masstrans...@googlegroups.com.
To unsubscribe from this group, send email to masstransit-dis...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/masstransit-discuss?hl=en.

Dru Sellers

unread,
Jun 26, 2012, 4:17:47 PM6/26/12
to masstrans...@googlegroups.com
yes, urls with passwords in them are

username:password@machine


-d

kreiggers

unread,
Jun 26, 2012, 4:18:56 PM6/26/12
to masstrans...@googlegroups.com
Out-of-the-box install and samples, I have not had to specify the user/password in the URI. If you look at your excpetion though, it shows that your URI is invalid... the ':localhost' is being interpreted as a port. Try getting rid of all that and just use rabbitmq://localhost/MyQueue

kreiggers

unread,
Jun 26, 2012, 4:21:09 PM6/26/12
to masstrans...@googlegroups.com
Here's some docs on how the url with username and passwords should be constructed:  http://www.cs.rutgers.edu/~watrous/user-pass-url.html 

e.g. rabbitmq://myusername:sekretpassword@localhost/MyQueue

Baskin Tapkan

unread,
Jun 26, 2012, 7:04:28 PM6/26/12
to masstrans...@googlegroups.com
That is exactly it and makes a lot of sense now. I have never seen username@password type syntax before. Thanks for correcting. Now if I could recall those two hours of my life debugging/troubleshooting this. But that is the way it goes. Thank you so much for the response and the resolution. Yay!!!
Reply all
Reply to author
Forward
0 new messages