[rabbitmq-discuss] Exchanges, Routing, and AMQP
Kirk Wylie
kirk at kirkwylie.com
Mon Oct 20 16:01:55 BST 2008
Ben asked me to open this up to a list-wide audience, and figured this
would be better than lots of ping-pong back-and-forth on blogs, so I'm
kicking off the topic.
Some background:
http://hopper.squarespace.com/blog/2008/10/7/consumer-driven-messaging.html
http://kirkwylie.blogspot.com/2008/07/amqps-semantic-model-and-mismatching.html
Summary:
I don't believe that the current Exchange system in AMQP (and thus in
RabbitMQ) really accurately represents consumer-driven messaging, in
that the producer of a message has an implicit option to determine the
manner in which messages are routed to consumers by declaring the
exchange and thus its type.
Personally, I believe that the spec should be changed so that
exchanges are nothing other than producer-provided namespaces/groups
of related messages, and consumers should bind to exchanges based on
the semantics that they want.
Example:
Producer is aggregating tick data from a variety of sources. It
publishes to three exchanges, that it declares:
- ControlMsg (for all control messages that don't contain ticks)
- OPRA (for the OPRA feed)
- NYSE (for the NYSE feed)
- TSE (for the Tokyo stock exchange feed)
Subscribers bind their queue to the exchanges that they're interested
in, and when they declare the binding, they ALSO declare the routing
rules that they want, out of a set of routing rules available to them.
Backwards Compatibility?
Yes, you can still achieve backwards compatibility here, particularly
with the "implicit" exchanges, by allowing exchanges to have "default"
routing rules which are specified by the producer's exchange assertion
(or the default assertion). This means that existing applications will
continue to work, and you can develop new applications with consumer
driven bindings that all work.
Ben, care to take it up from here?
Kirk Wylie
More information about the rabbitmq-discuss
mailing list