Changing the URI on MassTransit 3 causes it to quit working for me.

36 views
Skip to first unread message

Scott Danks

unread,
Sep 23, 2016, 5:05:11 PM9/23/16
to masstransit-discuss
This is working:
var bus = Bus.Factory.CreateUsingRabbitMq(x =>
               {
                   var host = x.Host(new Uri("rabbitmq://localhost/"), h => { });
 
               x.ReceiveEndpoint(host, "MtPubSubExample_TestSubscriber", e =>
                   e.Consumer<SomethingHappenedConsumer>());
               });


But this does not:

var bus = Bus.Factory.CreateUsingRabbitMq(x =>
               {
                   var host = x.Host(new Uri("rabbitmq://10.120.244.161/"), h => { });
 
               x.ReceiveEndpoint(host, "MtPubSubExample_TestSubscriber", e =>
                   e.Consumer<SomethingHappenedConsumer>());
               });

Any ideas on what I am doing wrong?  Should I be specifying a port with the IP or something?  
I also tried just the server name in place of the IP but that didnt work either.

Chris Patterson

unread,
Sep 23, 2016, 5:09:50 PM9/23/16
to masstrans...@googlegroups.com
Why doesn't it connect? Is RabbitMQ actually bound to that IP address (by default, I think it only binds to localhost).

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstransit-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/974a4ca3-84cd-43d4-aac5-628726f717fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Scott Danks

unread,
Sep 23, 2016, 5:17:06 PM9/23/16
to masstransit-discuss
So a little more info.  If I run it on my development pc, both the publisher and consumer work great (With Locahost).  If I run them both on the server they work great (With Locahost).  BUT if I run the consumer on the server, and the publisher on my dev pc, and specify the computer IP of the server, it doesnt work.  I cant even start up the consumer on the server if I specify it's own IP address.  But it works with just the localhost.  As you can see I am trying to run a publisher across the network from the consumer by using addresses at the consumer end for the URI and RecieveEndPoint.  I dont know if this is how it is supposed to work or not. But it worked for me in MT2 with this type of scenario.

Thanks Chris.

Scott Danks

unread,
Sep 23, 2016, 5:44:09 PM9/23/16
to masstransit-discuss
You know what?  I think it was the receivefrom that I used as the queue on the other end.  Thanks for the info.  I beleive it was just localhost for the URI.

Thanks,
Scott.

Scott Danks

unread,
Sep 26, 2016, 10:30:11 AM9/26/16
to masstransit-discuss
I am still having difficulty with this.
I am trying to received from a remote queue.
Here is the code.
It complies but does not run.  It says that the queue does not exist.
Doesnt it get created if it does not exist already?
The IP address is the remote Server that has Rabbitmq installed on it already.


static void Main(string[] args)
           {
               Log4NetLogger.Use();
               var bus = Bus.Factory.CreateUsingRabbitMq(x =>
               {
                   var host = x.Host(new Uri("rabbitmq://localhost/"), h =>
 { });
 
                   x.ReceiveEndpoint(@"\\10.120.244.161\Scott", e =>
                   e.Consumer<SomethingHappenedConsumer>());
               });
              
                      
 
               var busHandle = bus.Start();
               Console.ReadKey();
               busHandle.Stop();
           }



On Friday, September 23, 2016 at 4:09:50 PM UTC-5, Chris Patterson wrote:
Why doesn't it connect? Is RabbitMQ actually bound to that IP address (by default, I think it only binds to localhost).
On Fri, Sep 23, 2016 at 2:05 PM, Scott Danks <sdank...@gmail.com> wrote:
This is working:
var bus = Bus.Factory.CreateUsingRabbitMq(x =>
               {
                   var host = x.Host(new Uri("rabbitmq://localhost/"), h => { });
 
               x.ReceiveEndpoint(host, "MtPubSubExample_TestSubscriber", e =>
                   e.Consumer<SomethingHappenedConsumer>());
               });


But this does not:

var bus = Bus.Factory.CreateUsingRabbitMq(x =>
               {
                   var host = x.Host(new Uri("rabbitmq://10.120.244.161/"), h => { });
 
               x.ReceiveEndpoint(host, "MtPubSubExample_TestSubscriber", e =>
                   e.Consumer<SomethingHappenedConsumer>());
               });

Any ideas on what I am doing wrong?  Should I be specifying a port with the IP or something?  
I also tried just the server name in place of the IP but that didnt work either.

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages