[rabbitmq-discuss] Header exchange filtering on Int32 numbers
Emile Joubert
emile at rabbitmq.com
Tue Aug 27 13:09:57 BST 2013
Hi Andrew,
On 23/08/13 17:10, Miller Andrew wrote:
> I have a header exchange setup, with a durable queue bound to it with a
> blank routing key, and a single argument of “SourceEventCount=2”, where
> 2 is specified as a Number. When I publish to the exchange from the
> .Net client, if the SourceEventCount header value I add is an Int32, it
> doesn’t get routed to the queue. It only works if I cast the header
> value to an Int64. Is this a bug, or am I doing something wrong?
At the time of writing the implementation of the headers exchange in
RabbitMQ demands that the values as well as their types match. If the
arguments table of the binding had a 64bit integer then only messages
with 64bit integers in the header will match. See
http://hg.rabbitmq.com/rabbitmq-server/file/e555ae16396f/src/rabbit_exchange_type_headers.erl#l112
The specification is not as strict, so there is scope for relaxing this
restriction. Thanks for the suggestion. The release notes will make
mention of this change if it is implemented in the future. In the
meantime please ensure that both values and types match.
-Emile
More information about the rabbitmq-discuss
mailing list