mt3 saga and rabbitmq bindings

52 views
Skip to first unread message

Brian Weeres

unread,
Mar 27, 2015, 6:08:44 PM3/27/15
to masstrans...@googlegroups.com
In MT3 if I register a saga that takes MessageOne no exchange bindings are created for the queue in RabbitMQ. If I register a consumer that handles the same message the bindings are created and the saga will actually receive messages properly. Do I need to do something else to have the saga bindings for the various messages it handles get created? 


x.ReceiveEndpoint(host, "test_queue", e =>
                {
                    e.Consumer<MessageOneConsumer>(); // required or the bindings for TestSaga are not created and it never receives messages
                    e.Saga<TestSaga>(repository); 
});

Chris Patterson

unread,
Mar 27, 2015, 6:26:59 PM3/27/15
to masstrans...@googlegroups.com
This is clearly a bug, I'll create an issue for it.

--
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/291be117-939e-46d8-b4d4-32d4f36daba4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Brian Weeres

unread,
Apr 1, 2015, 10:27:59 AM4/1/15
to masstrans...@googlegroups.com
Looks like the same issue may exist for Consumers if I do not use the  e.Consumer<MessageOneConsumer>(); method the bindings are never created.
If I do this:

e.Consumer(typeof(MessageOneConsumer), (t) =>
{
   Activator.CreateInstance(t);

});

The delegate is never called because the bindings are never created. If I create the bindings by using the first Consumer overload then change to the second overload the delegate is called and the consumer instance is created and everything works.



On Friday, March 27, 2015 at 5:26:59 PM UTC-5, Chris Patterson wrote:
This is clearly a bug, I'll create an issue for it.
On Fri, Mar 27, 2015 at 3:08 PM, Brian Weeres <bwe...@gmail.com> wrote:
In MT3 if I register a saga that takes MessageOne no exchange bindings are created for the queue in RabbitMQ. If I register a consumer that handles the same message the bindings are created and the saga will actually receive messages properly. Do I need to do something else to have the saga bindings for the various messages it handles get created? 


x.ReceiveEndpoint(host, "test_queue", e =>
                {
                    e.Consumer<MessageOneConsumer>(); // required or the bindings for TestSaga are not created and it never receives messages
                    e.Saga<TestSaga>(repository); 
});

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

Brian Weeres

unread,
Apr 1, 2015, 5:33:49 PM4/1/15
to masstrans...@googlegroups.com

I pulled down Alpha 3.0.3 and the bindings for the consumer seem to be working fine. Not sure if it was fixed or if I was causing an issue by registering multiple endpoints with the same host and queue name. In either case using the bindings are created for my consumers properly using the overload below.

Chris Patterson

unread,
Apr 1, 2015, 6:20:12 PM4/1/15
to masstrans...@googlegroups.com
It was fixed in 3.0.3, and I just added tests to verify those bindings (the tests actually clear them from the vhost before the test to ensure it isn't a remnant).

--
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.
Reply all
Reply to author
Forward
0 new messages