public class MyMessageEvent : MyMessage{ public string Text { get; set; }}
public interface MyMessage{ string Text { get; }}
...
bus.Publish(new MyMessageEvent { Text = "Test" }); //Expecting to publish to MyMessage topic??, but it is publishing to MyMessageEvent topic
bus.Publish<MyMessage>(new MyMessageEvent { Text = "Test" }); //Publishes to MyMessage topic as expected, but not sure I want to do this for the versioning scenario where the concrete class implements multiple interfaces (interface per version).
--
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 masstransit-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/fa7e1917-3972-4666-a1ac-6a92f589a0f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Service bus is limited right now, so you need to do the latter.A later version of MT will support the inheritance chain properly on service bus.
On Sun, May 7, 2017 at 7:05 PM, Long Mai <long...@gmail.com> wrote:
Hey,I simplified a scenario that it is doing something I wasn't expecting. Am I understanding correctly how MT should work? If so, is this supported in ASB?
public class MyMessageEvent : MyMessage{public string Text { get; set; }}public interface MyMessage{string Text { get; }}bus.Publish(new MyMessageEvent { Text = "Test" }); //Expecting to publish to MyMessage topic??, but it is publishing to MyMessageEvent topic
...
bus.Publish<MyMessage>(new MyMessageEvent { Text = "Test" }); //Publishes to MyMessage topic as expected, but not sure I want to do this for the versioning scenario where the concrete class implements multiple interfaces (interface per version).
--
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 Chris.Something I'm considering is possibly contributing if time allows for it in the next month and you think the scope of impact is minimal. I may need a little guidance if this is something you think you would consider delegating unless this is something being worked on now or soon.My current implementation that I'm leaning towards is this. I would, of course, use reflection to get the base types. For each base type, create its own subscription that autoforwards it to its own topic, creating the topics. In my example shared earlier, we would have a topic MyMessageEvent that has a subscription MyMessage that auto forwards to MyMessage topic. I assume it should deserialize without issues to the appropriate contracts. I would need to create the topics for each base types and set up the autoforwarding.
On Sunday, May 7, 2017 at 11:55:21 PM UTC-5, Chris Patterson wrote:
Service bus is limited right now, so you need to do the latter.A later version of MT will support the inheritance chain properly on service bus.
On Sun, May 7, 2017 at 7:05 PM, Long Mai <long...@gmail.com> wrote:
Hey,I simplified a scenario that it is doing something I wasn't expecting. Am I understanding correctly how MT should work? If so, is this supported in ASB?
public class MyMessageEvent : MyMessage{public string Text { get; set; }}public interface MyMessage{string Text { get; }}bus.Publish(new MyMessageEvent { Text = "Test" }); //Expecting to publish to MyMessage topic??, but it is publishing to MyMessageEvent topic
...
bus.Publish<MyMessage>(new MyMessageEvent { Text = "Test" }); //Publishes to MyMessage topic as expected, but not sure I want to do this for the versioning scenario where the concrete class implements multiple interfaces (interface per version).
--
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+unsubscribe...@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/fa7e1917-3972-4666-a1ac-6a92f589a0f4%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 masstransit-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/c68c8651-df99-48a7-964b-60056eb4005b%40googlegroups.com.
public class MyMessageConsumer : IConsumer<MyMessageV1> { public async Task Consume(ConsumeContext<MyMessageV1> context) { await Console.Out.WriteLineAsync(context.Message.Text); } }
...
sbc.SubscriptionEndpoint<MyMessageV1>(host, "consumer1", ep => { ep.Consumer<MyMessageConsumer>(); });
That's already in the /develop branch of MT, so nothing to contribute. IT just hasn't be released yet.
On Mon, May 8, 2017 at 5:19 AM, Long Mai <long...@gmail.com> wrote:
Thanks Chris.Something I'm considering is possibly contributing if time allows for it in the next month and you think the scope of impact is minimal. I may need a little guidance if this is something you think you would consider delegating unless this is something being worked on now or soon.My current implementation that I'm leaning towards is this. I would, of course, use reflection to get the base types. For each base type, create its own subscription that autoforwards it to its own topic, creating the topics. In my example shared earlier, we would have a topic MyMessageEvent that has a subscription MyMessage that auto forwards to MyMessage topic. I assume it should deserialize without issues to the appropriate contracts. I would need to create the topics for each base types and set up the autoforwarding.
On Sunday, May 7, 2017 at 11:55:21 PM UTC-5, Chris Patterson wrote:
Service bus is limited right now, so you need to do the latter.A later version of MT will support the inheritance chain properly on service bus.
On Sun, May 7, 2017 at 7:05 PM, Long Mai <long...@gmail.com> wrote:
Hey,I simplified a scenario that it is doing something I wasn't expecting. Am I understanding correctly how MT should work? If so, is this supported in ASB?
public class MyMessageEvent : MyMessage{public string Text { get; set; }}public interface MyMessage{string Text { get; }}bus.Publish(new MyMessageEvent { Text = "Test" }); //Expecting to publish to MyMessage topic??, but it is publishing to MyMessageEvent topic
...
bus.Publish<MyMessage>(new MyMessageEvent { Text = "Test" }); //Publishes to MyMessage topic as expected, but not sure I want to do this for the versioning scenario where the concrete class implements multiple interfaces (interface per version).
--
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/fa7e1917-3972-4666-a1ac-6a92f589a0f4%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.