Yeah, I am not necessarily in love with it either -- it's just that my
domain is of course hierarchical. I could refactor the messages via
composition, and inheritance - but in this case 'persistence' messages
are dispatched with a particular type to persist and the message
contains some cache data.
Here's the code - the validation bus dispatches the message to the
persistence bus.
var validationBus = ServiceBusFactory.New(sbc =>
{
sbc.UseRabbitMqRouting();
sbc.UseControlBus();
sbc.ReceiveFrom(validationQueueName);
sbc.Subscribe(subs => subs.Consumer(() =>
Kernel.Get<ValidationRequestInterface>()).Permanent());
});
var persistenceBus = ServiceBusFactory.New(sbc =>
{
sbc.UseRabbitMqRouting();
sbc.UseControlBus();
sbc.ReceiveFrom(persistenceQueueName);
sbc.Subscribe(subs => subs.Consumer(() =>
Kernel.Get<PersistenceRequestInterface>()).Permanent());
});
On May 9, 12:26 pm, Dru Sellers <
d...@drusellers.com> wrote:
> while I know that it is possible, I would question the use of generics in a
> message contract.
>
> to answer your question I will need to see the complete registration code
> from both the sender and the receivers 'the servicebusconfigurator' code.
>
> -d
>
>
>
>
>
>
>
> On Wed, May 9, 2012 at 10:53 AM, schaibaa <
adam.schai...@gmail.com> wrote:
> > Hello everyone,
>
> > The board has been extremely helpful before - - especially Dru, so
> > here I am :)
>
> > I've read this thread regarding message construction:
>
> >
http://groups.google.com/group/masstransit-discuss/browse_thread/thre...