<div>The fanout + alternate-exchange for junk works, except I can&#39;t make these extra exchanges exclusive like I can when declaring a server assigned, exclusive, autodelete queue with queueDeclare(). That&#39;s probably not a big deal, as nobody would likely guess the names of these extra exchanges.</div>

<div><br></div><div>I think I&#39;d take a simple negation binding over a full regex if there are performance implications. Negation bindings obviously would need to be declared before other bindings or a match could be found before it got to the negation, but I think that&#39;s reasonable - typical rules processing works this way. It doesn&#39;t seem like with these types of negations would have performance implications with the caveat that they must be earlier in the list of bindings.</div>

<div><div><div><br><div class="gmail_quote">On Thu, Sep 13, 2012 at 10:53 AM, Laing, Michael P. <span dir="ltr">&lt;<a href="mailto:Michael.Laing@nytimes.com" target="_blank">Michael.Laing@nytimes.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We would find a regular expression matching option for topic exchanges<br>
most useful.<br>
<br>
My 2 cents :)<br>
<br>
Michael<br>
<div><div class="h5"><br>
On 9/13/12 4:40 AM, &quot;Simon MacMullen&quot; &lt;<a href="mailto:simon@rabbitmq.com">simon@rabbitmq.com</a>&gt; wrote:<br>
<br>
&gt;On 12/09/2012 8:37PM, Dave Curylo wrote:<br>
&gt;&gt; Is it possible to bind a queue to a topic exchange with a condition that<br>
&gt;&gt; the topic does NOT match a certain wildcard?<br>
&gt;<br>
&gt;The topic exchange doesn&#39;t have that logic. But you can fake it with the<br>
&gt;alternate exchange feature, at the cost of a few more exchanges.<br>
&gt;<br>
&gt;Declare a fanout exchange you&#39;ll publish to (let&#39;s call it<br>
&gt;&quot;my-exchange&quot;). Declare a fanout exchange called &quot;junk&quot;.<br>
&gt;<br>
&gt;The when each consumer declares a queue, it also declares a topic<br>
&gt;exchange and a fanout exchange. The alternate-exchange for the topic<br>
&gt;exchange should be set to the fanout exchange. It then binds the topic<br>
&gt;exchange to &quot;my-exchange&quot;, and &quot;junk&quot; to the topic exchange, with a<br>
&gt;routing key equal to the topics it doesn&#39;t want.<br>
&gt;<br>
&gt;Thus messages with the &quot;bad&quot; routing key go:<br>
&gt;<br>
&gt; � [my-exchange] -&gt; [per-consumer-topic] -&gt; [junk]<br>
&gt;<br>
&gt;and the rest go:<br>
&gt;<br>
&gt; � [my-exchange] -&gt; [per-consumer-topic] -&gt; [per-consumer-fanout] -&gt;<br>
&gt;[per-consumer-queue]<br>
&gt;<br>
&gt;I think that&#39;s the simplest you can make it. But exchanges are cheap in<br>
&gt;general, it&#39;s just routing logic.<br>
&gt;<br>
&gt;But I wonder whether some sort of more explicit negation feature would<br>
&gt;be feasible / useful. Hmm.<br>
&gt;<br>
&gt;Cheers, Simon<br>
</div></div>&gt;_______________________________________________<br>
&gt;rabbitmq-discuss mailing list<br>
&gt;<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
&gt;<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>
<br>
</blockquote></div><br></div></div></div>