<div dir="ltr">I&#39;ve had cases where allowing the publisher to specify wildcards would help too. �I think it&#39;s a very useful custom exchange and would gladly use it if RabbitMQ or anyone else ever published it as an extension.<div>
<br></div><div>-Chris</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 30, 2013 at 11:29 AM, Lawrence Freil <span dir="ltr">&lt;<a href="mailto:lef@apago.com" target="_blank">lef@apago.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Emile,<br>
<br>
Thanks for the reply.<br>
<br>
I had considered this approach and could use this for initial testing, however the feature set that I am looking for is somewhat large and could expand, each time doubling the combinations. I think the end result will be creating an exchange plugin very similar to the topic exchange but where the &#39;*&#39; and &#39;#&#39; can also be used in the message routing keys. Using this wouldn&#39;t break any existing topic exchange usage but would allow messages to be crafted with &#39;I don&#39;t care&#39;, and if a trailing &#39;#&#39; was always used in the message, adding new features to the servers wouldn&#39;t break existing producers.<div class="HOEnZb">
<div class="h5"><br>
<br>
On Oct 30 2013, Emile Joubert wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 30/10/13 13:54, Lawrence Freil wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is there a way to accomplish this with the current exchanges?<br>
</blockquote>
<br>
There may be a way to approximate this with a topic exchange if you<br>
associate features with consumers rather than queues. You could create a<br>
queue for each combination of features and bind so that it received<br>
messages that require exactly those features.<br>
<br>
E.g. you could declare queues<br>
<br>
____, w___, _x___, __y_, ___z,<br>
wx__, ... , w__z, ..., wxyz.<br>
<br>
and bind them:<br>
<br>
____ with binding key _._._._<br>
w___ with binding key w._._._<br>
_x__ with binding key _.x._._<br>
__y_ with binding key _._.y._<br>
___z with binding key _._._.z<br>
...<br>
wx__ with binding key w.x._._<br>
w__z with binding key w._._.z<br>
...<br>
wxyz with binding key w.x.y.z<br>
<br>
Consumers can then consume from all queues that contain messages that<br>
demand a subset of the features offered by that consumer, e.g. a<br>
consumer that offers<br>
<br>
x and y consumes from ____ and _x__ and __y_ and _xy_<br>
only z �consumes from ____ and ___z<br>
w,x,y,z consumes from all queues<br>
<br>
Then if you publish a message with routing key _.x.y._ it will arrive at<br>
queue _xy_ and be sent to a consumer that is guaranteed to offer x and y.<br>
<br>
<br>
If the number of features is large or rapidly changing then this will<br>
become unmanageable. If the features are strictly associated with queues<br>
rather than consumers then it also won&#39;t work.<br>
<br>
<br>
<br>
-Emile<br>
<br>
<br>
<br>
<br>
<br>
<br>
</blockquote>
<br></div></div><div class="im HOEnZb">
-- <br>
Lawrence Freil<br>
<a href="mailto:lef@apago.com" target="_blank">lef@apago.com</a><br>
<a href="tel:770-619-1884" value="+17706191884" target="_blank">770-619-1884</a><br></div><div class="HOEnZb"><div class="h5">
______________________________<u></u>_________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.<u></u>rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/<u></u>cgi-bin/mailman/listinfo/<u></u>rabbitmq-discuss</a><br>
</div></div></blockquote></div><br></div>