From fc2bbad89dbd1a7d60c95fbb0c3c987f3931f145 Mon Sep 17 00:00:00 2001 From: Keith Wall Date: Mon, 7 Oct 2013 14:30:09 +0000 Subject: QPID-5202: Exchange documentation - incorporate initial feedback Feedback from Robbie Gemmell and Oleksandr Rudyy. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1529848 13f79535-47bb-0310-9956-ffa450edef68 --- .../java-broker/Java-Broker-Concepts-Exchanges.xml | 35 +++++++++++----------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/qpid/doc/book/src/java-broker/Java-Broker-Concepts-Exchanges.xml b/qpid/doc/book/src/java-broker/Java-Broker-Concepts-Exchanges.xml index ad9e21918a..2b6e1ec684 100644 --- a/qpid/doc/book/src/java-broker/Java-Broker-Concepts-Exchanges.xml +++ b/qpid/doc/book/src/java-broker/Java-Broker-Concepts-Exchanges.xml @@ -26,7 +26,7 @@ messages from producers and routes them to matching Queues within the Virtual Host. The server provides a set of exchange types with each exchange type implementing a different routing algorithm. For details of how these exchanges types work see below. - The server predeclares a number of exchange instances with names starting with amq.. These are defined in + The server predeclares a number of exchange instances with names starting with "amq.". These are defined in . Applications can make use the pre-declared exchanges, or they may declare their own. The number of exchanges within a virtual host is limited only by resource constraints. @@ -42,10 +42,11 @@ amq.match (an instance of a headers exchange) - An exchange known as the default exchange is also pre-declared. This is a direct exchange but is special in that all - queues are automatically bound to it once using their name as a binding key. It is not possible to manually add or remove + The conceptual "default exchange" always exists, effectively a special instance of + direct exchange which uses the empty string as its name. All queues are automatically bound to it upon their creation + using the queue name as the binding key, and unbound upon their deletion. It is not possible to manually add or remove bindings within this exchange. - Applications may not declare exchanges with names beginning with amq.. Such names are reserved for system use. + Applications may not declare exchanges with names beginning with "amq.". Such names are reserved for system use.
Exchange Types @@ -76,9 +77,9 @@ The figure above illustrates the operation of direct exchange type. The yellow messages published with the routing key - myqueue match the binding key corresponding to queue myqueue to are routes there. The red - messages published with the routing key foo match two bindings in the table so a copy of the message is - routed to both bar1 and bar2. + "myqueue" match the binding key corresponding to queue "myqueue" and so are routed there. The red + messages published with the routing key "foo" match two bindings in the table so a copy of the message is + routed to both the "bar1" and "bar2" queues. The routing key of the blue message matches no binding keys, so the message is unroutable. It is handled as described in .
@@ -101,7 +102,7 @@ - The figure above illustrates publishing messages with routing key weather. The exchange routes each + The figure above illustrates publishing messages with routing key "weather". The exchange routes each message to every bound queue whose binding key matches the routing key. In the case illustrated, this means that each subscriber's queue receives every yellow message.
@@ -115,9 +116,9 @@ The figure above illustrates publishing messages with hierarchical routing keys. As before, the exchange routes each message to every bound queue whose binding key matches the routing key but as the binding keys contain wildcards, the wildcard rules described above apply. - In the case illustrated, sub1 has received the red and green message as news.uk and news.de - match binding key news.#. The red message has also gone to sub2 and sub3 as it's routing key - is matched exactly by news.uk and by *.uk. + In the case illustrated, sub1 has received the red and green message as "news.uk" and "news.de" + match binding key "news.#". The red message has also gone to sub2 and sub3 as it's routing key + is matched exactly by "news.uk" and by "*.uk". The routing key of the yellow message matches no binding keys, so the message is unroutable. It is handled as described in .
@@ -128,13 +129,13 @@
- The figure above illustrates messages with properties published with routing key shipping. + The figure above illustrates messages with properties published with routing key "shipping". As before, the exchange routes each message to every bound queue whose binding key matches the routing key but as a JMS selector - argument has been specified, the expression is evalutated against each matching message. Only messages whose message's header values or properties + argument has been specified, the expression is evalutated against each matching message. Only messages whose message header values or properties match the expression are routed to the queue. - In the case illustrated, sub1 has received the yellow and blue message as their property area - cause expression area in ('Forties', 'Cromarty') to evaluate true. Similarly, the yellow message has also gone to - gale_alert as its property speed causes expression speed > 7 and speed < 10. + In the case illustrated, sub1 has received the yellow and blue message as their property "area" + cause expression "area in ('Forties', 'Cromarty')" to evaluate true. Similarly, the yellow message has also gone to + gale_alert as its property "speed" causes expression "speed > 7 and speed < 10" to evaluate true. The properties of purple message cause expressions no evaluate true, so the message is unroutable. It is handled as described in . @@ -154,7 +155,7 @@
Headers The headers exchange type routes messages to queues based on header properties within the AMQP message. The message is - passed to a queue if the header properties of the message satisfy header matching arguments table with which the queue was bound. + passed to a queue if the header properties of the message satisfy the header matching arguments table with which the queue was bound.
-- cgit v1.2.1