Request/Response in MT3

110 views
Skip to first unread message

Christos Delivorias

unread,
May 6, 2015, 10:58:32 AM5/6/15
to masstrans...@googlegroups.com
I'm afraid I'll need to re-visit this matter, as I don't think I understand it enough to work it our myself.

I've got the following structure:

I've got classes in a Common solution to create the IBus so that I don't duplicate code, and also to provide a bootstrapped "Gateway" for clients, that will wire everything up, MT-wise, so that the client will only need to supply the MessageCommand to it.
My worker service seems to be workjing as I see 3 consumers in RMQ waiting with queues created for them.

I think that I'm not handling the MessageRequestClient correctly as the exchanges for the requestclient do not create any queues. I think it's because I'm not setting up the x.Handler the right way.

Can you guys take a look and guide me as to where I'm going wrong with this?

Thanks again.
Christos

Christos Delivorias

unread,
May 6, 2015, 11:23:40 AM5/6/15
to masstrans...@googlegroups.com
I should clarify by saying that while I see a confirmation of a message rate in RMQ, the queue messages are 0 and no queues are created for the terminal publisher.
The request eventually times-out.

Chris Patterson

unread,
May 6, 2015, 11:28:21 AM5/6/15
to masstrans...@googlegroups.com
I see a few things here, but your request client -- where is that code? The MassTransit one is MessageRequestClient, which implements the IRequestClient interface. I'm not seeing that in your Gist.


--
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/517ea96f-aa58-47d1-8c6d-31ef1c69fd3a%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Christos Delivorias

unread,
May 6, 2015, 11:31:39 AM5/6/15
to masstrans...@googlegroups.com
Hey Chris,

I've updated the Gist with the bootstrapper for the MessageRequestClient.

Thanks


On Wednesday, May 6, 2015 at 4:28:21 PM UTC+1, Chris Patterson wrote:
I see a few things here, but your request client -- where is that code? The MassTransit one is MessageRequestClient, which implements the IRequestClient interface. I'm not seeing that in your Gist.

On Wed, May 6, 2015 at 8:23 AM, Christos Delivorias <c.deli...@gmail.com> wrote:
I should clarify by saying that while I see a confirmation of a message rate in RMQ, the queue messages are 0 and no queues are created for the terminal publisher.
The request eventually times-out.


On Wednesday, May 6, 2015 at 3:58:32 PM UTC+1, Christos Delivorias wrote:
I'm afraid I'll need to re-visit this matter, as I don't think I understand it enough to work it our myself.

I've got the following structure:

I've got classes in a Common solution to create the IBus so that I don't duplicate code, and also to provide a bootstrapped "Gateway" for clients, that will wire everything up, MT-wise, so that the client will only need to supply the MessageCommand to it.
My worker service seems to be workjing as I see 3 consumers in RMQ waiting with queues created for them.

I think that I'm not handling the MessageRequestClient correctly as the exchanges for the requestclient do not create any queues. I think it's because I'm not setting up the x.Handler the right way.

Can you guys take a look and guide me as to where I'm going wrong with this?

Thanks again.
Christos

--
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 6, 2015, 11:38:03 AM5/6/15
to masstrans...@googlegroups.com
The biggest thing I see is that the request client should be sending to the queue where the service is subscribed to the request message. 

You're also creating multiple receive endpoints for some reason on the same queue, which is not a good idea as the empty one will discard all the message because there are no consumers subscribed.


On Wed, May 6, 2015 at 8:31 AM, Christos Delivorias <c.deli...@gmail.com> wrote:
Hey Chris,

I've updated the Gist with the bootstrapper for the MessageRequestClient.

Thanks

On Wednesday, May 6, 2015 at 4:28:21 PM UTC+1, Chris Patterson wrote:
I see a few things here, but your request client -- where is that code? The MassTransit one is MessageRequestClient, which implements the IRequestClient interface. I'm not seeing that in your Gist.

On Wed, May 6, 2015 at 8:23 AM, Christos Delivorias <c.deli...@gmail.com> wrote:
I should clarify by saying that while I see a confirmation of a message rate in RMQ, the queue messages are 0 and no queues are created for the terminal publisher.
The request eventually times-out.


On Wednesday, May 6, 2015 at 3:58:32 PM UTC+1, Christos Delivorias wrote:
I'm afraid I'll need to re-visit this matter, as I don't think I understand it enough to work it our myself.

I've got the following structure:

I've got classes in a Common solution to create the IBus so that I don't duplicate code, and also to provide a bootstrapped "Gateway" for clients, that will wire everything up, MT-wise, so that the client will only need to supply the MessageCommand to it.
My worker service seems to be workjing as I see 3 consumers in RMQ waiting with queues created for them.

I think that I'm not handling the MessageRequestClient correctly as the exchanges for the requestclient do not create any queues. I think it's because I'm not setting up the x.Handler the right way.

Can you guys take a look and guide me as to where I'm going wrong with this?

Thanks again.
Christos

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

Christos Delivorias

unread,
May 6, 2015, 11:55:21 AM5/6/15
to masstrans...@googlegroups.com
Let me see if I understand this Chris. The requestClient is sending to queue "request_client_FromTerminal". 
You're saying this queue should be the same as where the worker service is subscribed; right now it's pointing to "Quantum_worker"

If you take another look to the Gist, I've added the RequestHandler helper class that sets up and starts the worker bus service.

The multiple receive points are done so that I can modulate the bus based on whether the IBus is for a publisher or a subscriber. Is there a better way to do this? Can I still use examples from RapidTransit or are they more focused to MT2?

Thanks again mate,
your help has been invaluable.
I hope MT3 "clicks" for me soon, so I won't have to ask so many questions.

Christos


On Wednesday, May 6, 2015 at 4:38:03 PM UTC+1, Chris Patterson wrote:
The biggest thing I see is that the request client should be sending to the queue where the service is subscribed to the request message. 

You're also creating multiple receive endpoints for some reason on the same queue, which is not a good idea as the empty one will discard all the message because there are no consumers subscribed.

On Wed, May 6, 2015 at 8:31 AM, Christos Delivorias <c.deli...@gmail.com> wrote:
Hey Chris,

I've updated the Gist with the bootstrapper for the MessageRequestClient.

Thanks

On Wednesday, May 6, 2015 at 4:28:21 PM UTC+1, Chris Patterson wrote:
I see a few things here, but your request client -- where is that code? The MassTransit one is MessageRequestClient, which implements the IRequestClient interface. I'm not seeing that in your Gist.

On Wed, May 6, 2015 at 8:23 AM, Christos Delivorias <c.deli...@gmail.com> wrote:
I should clarify by saying that while I see a confirmation of a message rate in RMQ, the queue messages are 0 and no queues are created for the terminal publisher.
The request eventually times-out.


On Wednesday, May 6, 2015 at 3:58:32 PM UTC+1, Christos Delivorias wrote:
I'm afraid I'll need to re-visit this matter, as I don't think I understand it enough to work it our myself.

I've got the following structure:

I've got classes in a Common solution to create the IBus so that I don't duplicate code, and also to provide a bootstrapped "Gateway" for clients, that will wire everything up, MT-wise, so that the client will only need to supply the MessageCommand to it.
My worker service seems to be workjing as I see 3 consumers in RMQ waiting with queues created for them.

I think that I'm not handling the MessageRequestClient correctly as the exchanges for the requestclient do not create any queues. I think it's because I'm not setting up the x.Handler the right way.

Can you guys take a look and guide me as to where I'm going wrong with this?

Thanks again.
Christos

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

--
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 6, 2015, 1:21:24 PM5/6/15
to masstrans...@googlegroups.com
You cannot create multiple receive endpoints on the same queue, that's in the bad thing category.



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.

--
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 6, 2015, 1:59:54 PM5/6/15
to masstrans...@googlegroups.com
FYI, I just added this sample to hopefully answer a few questions.

I did find an issue with using the default (/) virtual host and endpoint resolution, so that might be what you're seeing. Of course I found the issue minutes after releasing 3.0.5-alpha.

Christos Delivorias

unread,
May 7, 2015, 11:16:58 AM5/7/15
to masstrans...@googlegroups.com
Can you link to where you posted the example?
I'd like to take a look at any docs that will help me understand the Req_Res bus.

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

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

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

Christos Delivorias

unread,
May 7, 2015, 11:58:52 AM5/7/15
to masstrans...@googlegroups.com
I'm at a point where I can send a request to RMQ, and the consumer sends back a response, but the task from the Request times-out and can't get a response.
the message arriving in the "request_client_FromTerminal" queue has the following header:

"messageId": "571e00001c9aa048807c08d256f43a48",

"requestId": "571e00001c9aa048af5508d256f43a48",
"sourceAddress": "rabbitmq://hostname:5672/App/bus-App.Client.Terminal.vshost-EDN11354-08d256f43a3748c3a0481c9a571e0000?durable=false&autodelete=true&exclusive=true&prefetch=16",

"destinationAddress": "rabbitmq://hostname/App/request_client_FromTerminal_EDN11354",

"responseAddress": "rabbitmq://hostname:5672/Quantum/bus-App.Client.Terminal.vshost-EDN11354-08d256f43a3748c3a0481c9a571e0000?durable=false&autodelete=true&exclusive=true&prefetch=16",

"messageType": [
"urn:message:Quantum.Gateway.Contract:IRequest"
],

 What's the difference between destination and response address?

Right now the command line requester is create a bus-App.Client.Terminal.vshost-HOSTNAME-Guid exchange/queue and also the receive point  "request_client_FromTerminal" which it shares with the worker consumer. The Consumer also create a bus-App.Worker..... exchange/queue.
Am I getting the queues correct here?

How can I try and debug why I'm not getting the response from the Request Task?

Thanks again Chris. I really appreciate all the guidance.
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.

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

--
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 7, 2015, 12:03:37 PM5/7/15
to masstrans...@googlegroups.com

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.

--
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 7, 2015, 12:05:43 PM5/7/15
to masstrans...@googlegroups.com
In your Gist, you weren't calling context.Respond() anywhere, which I think is your problem.


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.

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