[rabbitmq-discuss] Using .NET types as routing keys

Alfonso Pantoja alfonso.pantoja at gmail.com
Thu Apr 14 11:19:25 BST 2011


Hi Steven,


On 14 abr, 07:18, Steven Taylor <tayl... at gmail.com> wrote:

>
> Not sure what you mean here.  Like with a property of some kind?  What
> configuration mechanism are you plugging in via IoC.  How is it selected?
>

For example using Windsor Castle you can configure as "component id"
the routing keys you want to resolve.
So when you receive a message with routing key "myRoutingKey" the
class "myRoutingKeyClassHandler" will be resolved.
This handler (and others) must implement a common interface for
calling your handle method.
If you configure all handlers as singleton the only thing you have to
do is to dispose the container when closing the application.
With this technique you can inject more handlers when needed by
updating Windsor (or the IoC container you use) configuration.




Alfonso




More information about the rabbitmq-discuss mailing list