--
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/a6e34915-8bde-4c5c-8bd2-0f1032038e1a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You can subscribe to interfaces, but the approach you are presenting really does not follow what MT and messaging in general is designed to handle. MT will already dispatch messages to consumers by type, so a base class or common interface really adds zero value.This is particularly true in Command cases, where the command is a contract between the service and service's consumer. In this case, avoid sharing any implementation between different services as it confused ownership of contracts.Also, I highly recommend interfaces for all message contracts, because it ensures no behavior makes its way into the message itself.
On Sun, May 17, 2015 at 5:17 AM, Christos Delivorias <c.deli...@gmail.com> wrote:
Coming back to the example that Chris has published on the Request/Response communication.I wanted to be able to have a common gateway, that creates a MessageRequestClient<IRequest, IResponse> but then have consumers that impement the IConsumer<ConcreteRequest> or IConsumer<ReenforcedConcreteRequest>, where ConcreteRequest and ReenforcedConcreteRequest implement the IRequest interface. This way from one common gateway I can send multiple base requests, and have consumers with different logic produce Responses.I guess I could just have a gateway for each class of messages, but I'd like to avoid this kind of code bloat if I could.Am I missing something here?I believe MT can have consumers that subscribe to base classes; or is this jus tin the pub/sub model?Any thoughts would be useful on this.ThanksC.
--
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.
Thanks for the clarification Chris.So each message contract would need it's own MessageRequestClient? And for multiple message request you inevitably need multiple buses?Is that right?I just want to make sure I'm not duplicating MessageRequestClient constructors all over the place for no reason.
Thanks again.
On Monday, May 18, 2015 at 5:55:59 PM UTC+1, Chris Patterson wrote:
You can subscribe to interfaces, but the approach you are presenting really does not follow what MT and messaging in general is designed to handle. MT will already dispatch messages to consumers by type, so a base class or common interface really adds zero value.This is particularly true in Command cases, where the command is a contract between the service and service's consumer. In this case, avoid sharing any implementation between different services as it confused ownership of contracts.Also, I highly recommend interfaces for all message contracts, because it ensures no behavior makes its way into the message itself.
On Sun, May 17, 2015 at 5:17 AM, Christos Delivorias <c.deli...@gmail.com> wrote:
Coming back to the example that Chris has published on the Request/Response communication.I wanted to be able to have a common gateway, that creates a MessageRequestClient<IRequest, IResponse> but then have consumers that impement the IConsumer<ConcreteRequest> or IConsumer<ReenforcedConcreteRequest>, where ConcreteRequest and ReenforcedConcreteRequest implement the IRequest interface. This way from one common gateway I can send multiple base requests, and have consumers with different logic produce Responses.I guess I could just have a gateway for each class of messages, but I'd like to avoid this kind of code bloat if I could.Am I missing something here?I believe MT can have consumers that subscribe to base classes; or is this jus tin the pub/sub model?Any thoughts would be useful on this.ThanksC.
--
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/a6e34915-8bde-4c5c-8bd2-0f1032038e1a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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/3753d90d-e1ac-412e-b1db-a176e3b45871%40googlegroups.com.
For each request/response pair, you would create a different MessageRequestClient. The clients could all be on the same bus, however. The services, which consume the request and Respond should be on separate receive endpoints (their own queues). At least that's the way I see it making the most sense for your case.
On Tue, May 19, 2015 at 11:20 AM, Christos Delivorias <c.deli...@gmail.com> wrote:
Thanks for the clarification Chris.So each message contract would need it's own MessageRequestClient? And for multiple message request you inevitably need multiple buses?Is that right?I just want to make sure I'm not duplicating MessageRequestClient constructors all over the place for no reason.
Thanks again.
On Monday, May 18, 2015 at 5:55:59 PM UTC+1, Chris Patterson wrote:
You can subscribe to interfaces, but the approach you are presenting really does not follow what MT and messaging in general is designed to handle. MT will already dispatch messages to consumers by type, so a base class or common interface really adds zero value.This is particularly true in Command cases, where the command is a contract between the service and service's consumer. In this case, avoid sharing any implementation between different services as it confused ownership of contracts.Also, I highly recommend interfaces for all message contracts, because it ensures no behavior makes its way into the message itself.
On Sun, May 17, 2015 at 5:17 AM, Christos Delivorias <c.deli...@gmail.com> wrote:
Coming back to the example that Chris has published on the Request/Response communication.I wanted to be able to have a common gateway, that creates a MessageRequestClient<IRequest, IResponse> but then have consumers that impement the IConsumer<ConcreteRequest> or IConsumer<ReenforcedConcreteRequest>, where ConcreteRequest and ReenforcedConcreteRequest implement the IRequest interface. This way from one common gateway I can send multiple base requests, and have consumers with different logic produce Responses.I guess I could just have a gateway for each class of messages, but I'd like to avoid this kind of code bloat if I could.Am I missing something here?I believe MT can have consumers that subscribe to base classes; or is this jus tin the pub/sub model?Any thoughts would be useful on this.ThanksC.
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/a6e34915-8bde-4c5c-8bd2-0f1032038e1a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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.
Thanks.
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/a6e34915-8bde-4c5c-8bd2-0f1032038e1a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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/3753d90d-e1ac-412e-b1db-a176e3b45871%40googlegroups.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.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/dbda9d41-52c4-49ed-8e8e-91dc742cdfb3%40googlegroups.com.
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/a6e34915-8bde-4c5c-8bd2-0f1032038e1a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/3753d90d-e1ac-412e-b1db-a176e3b45871%40googlegroups.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.