Differences between IBus.Request vs IBus.PublishRequest

47 views
Skip to first unread message

Pedro Felix

unread,
Sep 22, 2016, 2:00:47 PM9/22/16
to masstransit-discuss
The IBus provides both the Request and PublishRequest methods. AFAIK, the major difference is the the former requires an endpoint address to be provided (E.g. RabbitMQ host and queue names). The later does not need that info, however its docs state "Using Request with an address is highly recommended".

In this context:

1) Does the PublishRequest use the same routing algorithm (e.g. exchange with the message's name when using RabbitMQ) used by Publish?
2) Why is Request preferable to PublishRequest? Don't having to know the endpoint address seems a good thing, from a client perspective. For instance, any entity that wants to change the customer address just needs to know the ChangeCustomerAddress message type and not the processor logical address. Am I missing something here?

Thanks
Pedro

Chris Patterson

unread,
Sep 22, 2016, 7:59:55 PM9/22/16
to masstrans...@googlegroups.com
Either way works, which is why it is available using both a send or a publish. And yes the routing is the same.

It's a matter of preference really. Some like explicit commands to be sent as commands, others prefer the dynamic routing of just using types. So your choice!

__
Chris Patterson




--
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/effa40ec-20a4-4f10-bd2c-e59a4b2105f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Pedro Felix

unread,
Sep 23, 2016, 6:44:52 AM9/23/16
to masstransit-discuss
Hi,

Thanks for the reply. One additional question: I didn't find a PublishSend (a Send using type based routing, i.e., without requiring the endpoint address). Is that because a PublishSend would be just a Publish?

Thanks
Pedro


On Friday, September 23, 2016 at 12:59:55 AM UTC+1, Chris Patterson wrote:
Either way works, which is why it is available using both a send or a publish. And yes the routing is the same.

It's a matter of preference really. Some like explicit commands to be sent as commands, others prefer the dynamic routing of just using types. So your choice!

__
Chris Patterson




On Thu, Sep 22, 2016 at 11:00 AM -0700, "Pedro Felix" <pmhs...@gmail.com> wrote:

The IBus provides both the Request and PublishRequest methods. AFAIK, the major difference is the the former requires an endpoint address to be provided (E.g. RabbitMQ host and queue names). The later does not need that info, however its docs state "Using Request with an address is highly recommended".

In this context:

1) Does the PublishRequest use the same routing algorithm (e.g. exchange with the message's name when using RabbitMQ) used by Publish?
2) Why is Request preferable to PublishRequest? Don't having to know the endpoint address seems a good thing, from a client perspective. For instance, any entity that wants to change the customer address just needs to know the ChangeCustomerAddress message type and not the processor logical address. Am I missing something here?

Thanks
Pedro

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

Chris Patterson

unread,
Sep 23, 2016, 8:57:23 AM9/23/16
to masstrans...@googlegroups.com
That's correct. Send and Publish are different methods. They'd never be together. 

__
Chris Patterson




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