[rabbitmq-discuss] New exchange type

Matthias Radestock matthias at lshift.net
Thu Apr 24 20:49:09 BST 2008


Kyle,


Kyle wrote:
>  Diff is attached.

a few comments ...

- Why is there the curious special-casing for the processing of the Args 
for a topic exchange?

- You should be able to use AMQP's boolean type for the "anycast" 
argument, rather than 0 and 1. Also, take a look at lists:keysearch. 
With those two changes the code should simplify to this:

H = route_sub(Exchange, RoutingKey),
case lists:keysearch(<<"anycast">>, 1, Args) of
     {value, {_Name, bool, true}} -> random_queue(H);
     _Other -> H
end.


Matthias.




More information about the rabbitmq-discuss mailing list