[rabbitmq-discuss] private exchange name generation

Tony Garnock-Jones tonygarnockjones+rabbitmq at gmail.com
Mon Apr 9 17:24:30 BST 2012

On 9 April 2012 11:59, Matwey V. Kornilov <matwey.kornilov at gmail.com> wrote:

> It is hard to avoid collisions. If I create private exchange and its names
> and arguments coincide with such of other one, then there is no way to
> detect the collision. If type or args are different then I can detect it
> and
> try to regenerate the name.

If you need crypto-strong names, then just trust in the size of your
keyspace. 160 bits is enough for anybody, right? :-)

If, on the other hand, you don't, but you can't tolerate even a level of
collision probability best described as "impossible", perhaps you could use
a Snowflake-like system:
http://engineering.twitter.com/2010/06/announcing-snowflake.html (Naturally
the implementation they're using is far too heavy for your needs, but the
core idea is sound.)

(As a third option, you might be able to cook up some scheme where you
create and bind to the exchange, and then send a "ping" message to it. If
you ever receive a ping from someone else, inform them they are colliding
with you.)

Tony Garnock-Jones
tonygarnockjones at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120409/a9b0fde1/attachment.htm>

More information about the rabbitmq-discuss mailing list