[rabbitmq-discuss] custom exchange checking auth user

Simon MacMullen simon at rabbitmq.com
Tue Jul 1 17:57:38 BST 2014


On 01/07/14 14:53, Dmitry Andrianov wrote:
> One more question: some time ago I was told that either custom exchange
> or decorator will both serve for my purpose.
> However while with exchange if I return empty list from route callback,
> no routing happens, the same does not seem to work in decorator.
> Reading Erlang in rabbit_exchange.erl is very hard for me so I can be
> wrong but it looks like whatever decorator returns from route is only
> appended to the list of destinations and decorator cannot override the
> ones selected by exchange.

That's correct.

> Is it correct? What is the correct way to deny processing message in the
> decorator?

You can't - I think at the point we said that we hadn't realised that 
was what you wanted to do.

The problem with allowing decorators to modify the existing routes as 
provided by the exchange is that it's not very obvious how to combine 
them when you have more than one decorator...

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, Pivotal


More information about the rabbitmq-discuss mailing list