[rabbitmq-discuss] Are Exchanges really necessary?
Ciprian Dorin Craciun
ciprian.craciun at gmail.com
Sat Feb 12 18:14:05 GMT 2011
On Sat, Feb 12, 2011 at 04:45, Max Bridgewater
<max.bridgewater at gmail.com> wrote:
> Hi,
>
> It's very likely that I don't really understand the concept of
> exchange. So please bear with me. Say I bind the queue with routing
> key "WashingtonPost" to the topic exchange "politics" using pattern
> "africa.egypt.#". Now if we get rid of the concept of exchange.
> Wouldn't this be equivalent to binding the "WashingtonPost" to the
> pattern "politics.africa.egypt.#"?
>
> What am I missing that makes the exchange paradigm so necessary in AMQP?
>
> Thanks,
> Max.
Although I can't provide a direct answer to your question, I would
say that at least from a security point of view, exchanges are very
useful as they allow me to explicitly allow / disallow which users can
either post or consume messages. (It is impossible to use ACL's on
routing keys.)
For example if I would to replace D-Bus with AMQP, only anyone
could subscribe to the "os.control" exchange (both the control daemon
but also interested users / applications), but only an OS operator
could publish messages to that particular exchange to for example
reboot the OS.
Further more, exchanges determine how routing is done -- some
based on the routing key, others based on headers -- and in recent
versions of RabbitMQ (2.2.0?) you can bind exchanges to exchanges,
thus offering you a poor-man AND / OR operators.
I hope others could provide you with a better / more to the point answer.
Ciprian.
More information about the rabbitmq-discuss
mailing list