Hi,
I'd like to know the exact difference between those two receive mechanisms.
I know from the doc, handlers should be less flexible because we cannot control the lifecycle. Consumers seems to be the way to go, BUT I got two concerns :
- first, I use LightInject as IoC container, and for now, there's no support for it (I've started my own receipe, it seems feasable)
- second (and most important), I don't want to include MassTransit in my domain logic (IConsumer<T>), so I have custom interfaces for receiver (ie. IHandleEvent<TEvent>, IHandleCommand<TCommand> => CQRS/ES style). I've tried to adapt mine into MT's but it doesn't seem that easy (using Consume(consumerType, consumerFactory) seems to be the right way but it makes me use tons of reflection at the moment of handling messages).
So my question is the following : in what way is it better to use consumers, and what do I gain ?
By the way, I've been playing around with MT3, cool async APIs :)
Best Regards,
Franck.