That's what I'm looking at now, but I am working around it by subclassing
the consumer at runtime for each class that implements the message interface
and adding that subclass to the container.  I haven't really dug deep, but
it seems like that will work.

My reasons for switching:

   1. Exploring all options.
   2. I really like the xcopy deployment and easy configuration of rhino
   queues.
   3. Upgrading to the latest version of NSB is a bit painful (I'm compiling
   Castle, NH, rhino, and NSB from the trunks), and since I already use rhino
   there is an opportunity to cut down on that work.
   4. The single-assembly, ilmerged NSB is a headache when we already have
   projects that reference castle, NH, and other libraries explicitly.

Thanks, Ayende!

On Thu, Jul 30, 2009 at 8:09 PM, Ayende Rahien <[email protected]> wrote:

> Oh,And what are your reasons to move from NSB to RSB?
>
>
> On Fri, Jul 31, 2009 at 5:09 AM, Ayende Rahien <[email protected]> wrote:
>
>> Tyler,No, RSB doesn't support this right now.
>> It should be pretty easy to patch, though. Take a look at
>> DefaultServiceBus.GatherConsumers()
>>
>>
>> On Fri, Jul 31, 2009 at 1:44 AM, tyler.burd <[email protected]> wrote:
>>
>>>
>>> Hi there.  I'm converting an application from NServiceBus to Rhino
>>> Service Bus, and I'm hung up on one thing.  In NSB you can create a
>>> MessageHandler that handles an interface.  Something like this:
>>>
>>> public class MySpecialMessageHandler :
>>> IMessageHandler<IAmASpecialMessage>
>>>
>>> NSB then calls this handler whenever it receives a message that
>>> implements the "IAmASpecialMessage" interface.  I can't recreate this
>>> behavior in RSB.  I tried the following:
>>>
>>> public class SpecialMessageConsumer : ConsumerOf<ISpecialMessage>
>>> {
>>>        public void Consume(ISpecialMessage message)
>>>        {
>>>                Console.WriteLine(string.Format("Consumed message of type
>>> : {0}",
>>> message.GetType().Name));
>>>        }
>>> }
>>>
>>> public class MySpecialMessage1 : ISpecialMessage {}
>>> public class MySpecialMessage2 : ISpecialMessage {}
>>>
>>> //code to initialize RSB and a windsor container
>>> container.AddComponent<SpecialMessageConsumer>();
>>> bus.Start();
>>> bus.Send(bus.Endpoint, new MySpecialMessage1());
>>> bus.Send(bus.Endpoint, new MySpecialMessage2());
>>>
>>> This never results in a message being consumed, and the log shows
>>> "ERROR - Got message RsbTest.MySpecialMessage2, but had no consumers
>>> for it"
>>>
>>> Is this possible?  Is there another way to handle this?
>>>
>>> Thanks!
>>> -tyler burd
>>>
>>>
>>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to