By the way, I have tried this in a small test app using rhino queues as the transport and everything seems to work as expected, I just can't run the tests until I get a Vista machine.
On Mon, Aug 10, 2009 at 12:39 AM, tyler.burd <[email protected]> wrote: > > Hi Ayende. I uploaded a patch that changes the DefaultServiceBus and > adds new methods to DefaultReflection. I do have tests for the > DefaultReflection methods. Unfortunately, I do not have access to a > computer with MSMQ 4.0, so I wasn't able to verify that the patch > leaves all of the other tests intact, as many of them depend on the > subqueues feature. If you have time to look over the patch and let me > know if it is up to snuff I'd appreciate it. I will try to get a > Vista box up and running in the meantime so that I can run the tests. > > Thanks! The uploaded file is consumer_of_base_types.patch. > -tyler burd > > On Jul 30, 8:09 pm, 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 -~----------~----~----~----~------~----~------~--~---
