Using MassTransit 3.0.5-alpha with RabbitMqTransport

861 views
Skip to first unread message

Annie Ju

unread,
May 22, 2015, 6:56:19 PM5/22/15
to masstrans...@googlegroups.com
Hi there,

I'm new to MassTransit, and recently started to use MassTransit NuGet 2.9.9 successfully, with a publisher that uses SerbviceBusFactory. 
This works with publishing to RabbitMQ on a remote host.


I then tried to use MassTransit  NuGet 3.0.5-alpha, as that has new features.
I added the MassTransit and MassTransit.RabbitMqTransport references (through NuGet) and wanted to implement the .NET publisher with the following:


using MassTransit;
using MassTransit.RabbitMqTransport;

...

            var hostAddress = new Uri("rabbitmq://remotehost/publish_queue");  
            IBusControl bus = Bus.Factory.CreateUsingRabbitMQ  (x =>
            {
                x.Host(hostAddress, h =>
                {
                    h.Username("myuser");
                    h.Password("mypassword");
                });
                x.ReceiveFrom("rabbitmq://remotehost/subscribe_queue");
            });

But I'm not able to access the method "CreateUsingRabbitMQ".  The only ones accessible from Bus.Factory are "CreateBus" and "CreateUsingInMemory", so I get this error:

'MassTransit.IBusFactory' does not contain a definition for 'CreateUsingRabbitMQ' and no extension method 'CreateUsingRabbitMQ' accepting a first argument of type 'MassTransit.IBusFactory' could be found (are you missing a using directive or an assembly reference?)

Any help would be appreciated.

Thanks,
Annie

Miguel Eduardo Román Martínez

unread,
May 23, 2015, 12:08:49 AM5/23/15
to masstrans...@googlegroups.com
I think you need to add the using MassTransit.RabbitMqTransport.Configuration;

regards,
Mike

--
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-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/a9b40602-0ada-49a3-8911-c651a2b6e9e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Luke Usher

unread,
May 25, 2015, 9:00:31 PM5/25/15
to masstrans...@googlegroups.com
I created a pull request for the docs a few days ago because I ran into this issue as well.

There appears to be other issues with the "show me the code" section as well though.
Copying and pasting the code into a new project and mt does not create any exchanges or queues in rabbitmq. It just seems to do nothing.

It was working fine when I first upgraded the project, but when I deleted all the exchanges and queues the did not get recreated.

I also tried the sample project from scratch on a different computer and had the same issue.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.

Chris Patterson

unread,
May 25, 2015, 10:42:18 PM5/25/15
to masstrans...@googlegroups.com
The next version of MT3 will have the namespace issue resolved so that the configuration extensions are in the primary (MassTransit) namespace. Sorry for this.

To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.

--
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-dis...@googlegroups.com.

To post to this group, send email to masstrans...@googlegroups.com.

Luke Usher

unread,
May 25, 2015, 11:49:38 PM5/25/15
to masstrans...@googlegroups.com
FYI, The issue I had with mt3 quickk start was solved by using a virtual host, which a suppose is a a sensible idea anyway.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-discuss+unsub...@googlegroups.com.

--
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.

Chris Patterson

unread,
May 25, 2015, 11:51:11 PM5/25/15
to masstrans...@googlegroups.com
Right, I _also_ think I fixed that with the latest alpha I just released. I think I did, about to verify.


To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.

--
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-dis...@googlegroups.com.

To post to this group, send email to masstrans...@googlegroups.com.

--
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-dis...@googlegroups.com.

To post to this group, send email to masstrans...@googlegroups.com.

Chris Patterson

unread,
May 26, 2015, 12:00:44 AM5/26/15
to masstrans...@googlegroups.com
Scratch that.
Reply all
Reply to author
Forward
0 new messages