[rabbitmq-discuss] New exchange type

Matthias Radestock matthias at lshift.net
Fri Apr 25 06:57:07 BST 2008


Kyle wrote:
> On Thu, Apr 24, 2008 at 3:49 PM, Matthias Radestock <matthias at lshift.net 
> <mailto:matthias at lshift.net>> wrote:
>     - Why is there the curious special-casing for the processing of the
>     Args for a topic exchange?
> The special case was already in the declare method in 
> rabbit_exchange.erl:60. Args for a topic exchange is set to a tuple: 
> {sets:new(), Args},

Ah, I am pretty sure that bit of code is no longer needed. We should fix 
that. Well spotted.

>     - 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:
> When I ran some tests of checking for the anycast argument, it came up 
> as a signedint. This may be due to the python library I used. I set 
> anycast=True, and got a signedint in rabbit_exchange:route.

It turns out that the boolean table field type is a protocol extension 
introduced by qpid that we subsequently implemented in our broker for 
better interoperability. It is not supported by our Java client (we will 
consider adding it) and, I suspect, the python lib you are using.

> Otherwise the match would have to be {_Name, signedint, 1}, correct?

Yes, that should work.


More information about the rabbitmq-discuss mailing list