<div dir="ltr">Hi,<div><br></div><div>I've created a "reverse topic exchange" plugin to accomplish uses cases like yours.</div><div><br></div><div>Take a look here: <a href="https://github.com/videlalvaro/rabbitmq-rtopic-exchange">https://github.com/videlalvaro/rabbitmq-rtopic-exchange</a></div>
<div><br></div><div>Feedback is most welcome.</div><div><br></div><div>Regards,</div><div><br></div><div>Alvaro</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 30, 2013 at 5:28 PM, Chris <span dir="ltr"><<a href="mailto:stuff@moesel.net" target="_blank">stuff@moesel.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I've had cases where allowing the publisher to specify wildcards would help too. I think it's a very useful custom exchange and would gladly use it if RabbitMQ or anyone else ever published it as an extension.<span class="HOEnZb"><font color="#888888"><div>
<br></div><div>-Chris</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Oct 30, 2013 at 11:29 AM, Lawrence Freil <span dir="ltr"><<a href="mailto:lef@apago.com" target="_blank">lef@apago.com</a>></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 '*' and '#' can also be used in the message routing keys. Using this wouldn't break any existing topic exchange usage but would allow messages to be crafted with 'I don't care', and if a trailing '#' was always used in the message, adding new features to the servers wouldn't break existing producers.<div>
<div><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't work.<br>
<br>
<br>
<br>
-Emile<br>
<br>
<br>
<br>
<br>
<br>
<br>
</blockquote>
<br></div></div><div>
-- <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><div>
______________________________<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>
</div></div><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>
<br></blockquote></div><br></div>