I am running into a base-typing problem with messages I am attempting to publish through MassTransit. Consider the following:
[Serializable]
public abstract
Edit: Serializer doesn't matter here. I didn't think this through.
You could invoke Bus.Instance.Publish
with the right type information by doing reflection on the Event
object and getting it's actual type as well. This is going to be some awkward code but once it's done likely easy to reuse. In Magnum we have an extension method to help with this.
Bus.Instance.FastInvoke(new[]{ event.GetType() }, "Publish", event);
Join us on the mailing list, http://groups.google.com/group/masstransit-discuss, and we'll be happy to discuss in more details.