Ok, I've got some further discoveries.
First of all, I managed to get RSB to subscribe my message handler.
How? By adding MyComponent again to Windsor Container, but this time
with IMessageConsumer interface exposed as a service:
<components>
<component id="MyComponent" type="WindsorTest1.MyDearComponent,
WindsorTest1" service="WindsorTest1.IMyDearComponent, WindsorTest1">
</component>
<component id="MyComponent_again"
type="WindsorTest1.MyDearComponent, WindsorTest1"
service="Rhino.ServiceBus.Internal.IMessageConsumer,
Rhino.ServiceBus">
</component>
</components>
Apparently RSB cannot find message handlers that have more than one
interface and you happen to register the wrong interface as a service.
I dont like it at all, Ayende please offer some workaround or fix.
There should be some way to tell Windsor that my component has two
interesting interfaces, not only one - does XML config support it (I
guess its called service forwarding)? But anyhow, RSB should find it
out auto-magically, without me telling it explicitly - look, here, it
is a message handler.
So naturally there's another question. Suppose I want MyDearComponent
to handle two types of messages. So I will inherit from ConsumerOf<T>
twice. Will RSB find both handler interfaces in such case? (I guess
yes, as long as IMessageConsumer is exposed as a service in windsor)
Now, after this encouraging success, I still have a problem. Message
is sent, but never gets received by MyDearComponent. When looking at
the queues I see the message was moved to 'rsbtest#discarded' queue.
Why was the message discarded?
Best regards
RG
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---