<div dir="ltr">By the way, I apologize if you already know this, but you *can* have multiple bindings on a queue. �So using routing keys wouldn&#39;t necessarily imply a large number of queues. �In regards to memory, bindings do have a memory footprint on the server, but if I recall, it is pretty small.<div>
<br></div><div>-Chris</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 21, 2013 at 5:05 AM, Emile Joubert <span dir="ltr">&lt;<a href="mailto:emile@rabbitmq.com" target="_blank">emile@rabbitmq.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi,<br>
<br>
On 21/08/13 02:07, Vikram Viswanathan wrote:<br>
&gt; I have a requirement where my rabbitmq consumer needs to receive<br>
&gt; messages from a single queue based on a certain filtering criteria.<br>
&gt; Something like a jms, where I can create a consumer based header<br>
&gt; property of messages.<br>
<br>
RabbitMQ does not support queue filtering. Messages can only be<br>
retrieved from the head of the queue. The idea of retrieving all the<br>
messages from a queue and rejecting non-matches is explicitly<br>
discouraged in the protocol specification.<br>
<br>
&gt; I do not want this to be done by exchange routing key, because this<br>
&gt; can mandate creating a large number of queues(I can possibly have a<br>
&gt; million routing keys)<br>
&gt;<br>
&gt; Is there a way to do it?<br>
<br>
If you don&#39;t want a queue for each possible routing key you could aim<br>
for an intermediate granularity. Or partition consumers by capability,<br>
create a queue per partition and route messages according to the<br>
capabilities required for processing.<br>
<br>
&gt; BTW, How much memory is allocated for each durable queue created in<br>
&gt; the server ? Is there a way to tune this parameter ?<br>
<br>
You can limit the memory a queue is likely to need by limiting the<br>
length of the queue or the time that messages may spend in the queue:<br>
<br>
<a href="http://www.rabbitmq.com/maxlength.html" target="_blank">http://www.rabbitmq.com/maxlength.html</a><br>
<a href="http://www.rabbitmq.com/ttl.html" target="_blank">http://www.rabbitmq.com/ttl.html</a><br>
<br>
<br>
<br>
<br>
<br>
-Emile<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
</blockquote></div><br></div>