[rabbitmq-discuss] Exchanges, Routing, and AMQP
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.
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.
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.
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?
More information about the rabbitmq-discuss