From 612b2152576b67ecfae04495127af4f9131688ca Mon Sep 17 00:00:00 2001 From: Keith Wall Date: Tue, 8 Oct 2013 21:49:03 +0000 Subject: QPID-5202: Exchange documentation - binding argument specifying JMS selector arguments are supported by exchange types direct, topic, and fanout. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1530441 13f79535-47bb-0310-9956-ffa450edef68 --- .../java-broker/Java-Broker-Concepts-Exchanges.xml | 42 ++++++++++++++++++---- 1 file changed, 36 insertions(+), 6 deletions(-) (limited to 'qpid/doc/book/src/java-broker/Java-Broker-Concepts-Exchanges.xml') 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 77d75a8fac..a416e68835 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 @@ -63,7 +63,9 @@
Direct The direct exchange type routes messages to queues based on an exact match between - the routing key of the message, and the binding key used to bind the queue to the exchange. + the routing key of the message, and the binding key used to bind the queue to the exchange. Additional + filter rules may be specified using a + binding argument specifying a JMS message selector. This exchange type is often used to implement point to point messaging. When used in this manner, the normal convention is that the binding key matches the name of the queue. It is also possible to use this exchange type @@ -90,9 +92,9 @@ binding key pattern defined by the queue binding. Routing keys are formed from one or more words, with each word delimited by a full-stop (.). The pattern matching characters are the * and # symbols. The * symbol matches a single word and the # symbol matches zero or more words. - The topic exchange is also capable of routing messages according to whether a message's header values or properties match - a JMS message selector This is a Qpid specific extension.. - The following three figures help explain how the topic exchange functions. + Additional filter rules may be specified using a + binding argument specifying a JMS message selector. + The following three figures help explain how the topic exchange functions.
Topic exchange - exact match on topic name @@ -143,6 +145,8 @@
Fanout The fanout exchange type routes messages to all queues bound to the exchange, regardless of the message's routing key. + Filter rules may be specified using a + binding argument specifying a JMS message selector.
Fanout exchange @@ -154,11 +158,37 @@
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 the header matching arguments table with which the queue was bound. + The headers exchange type routes messages to queues based on header properties within the message. The message is passed to + a queue if the header properties of the message satisfy the + x-match expression specified by the binding arguments with which the queue was bound.
+
+ Binding Arguments + Binding arguments are used by certain exchange types to further filter messages. +
+ JMS Selector + The binding argument x-filter-jms-selector specifies a JMS selector conditional expression. The expression + is written in terms of message header and message property names. If the expression evaluates to true, the message is routed to the queue. + This type of binding argument is understood by exchange types direct, topic and fanout. + This is a Qpid specific extension.. +
+
+ x-match + The binding argument x-match is understood by exchange type headers. It can take two values, dictating how the + rest of the name value pairs are treated during matching. + + all implies that all the other pairs must match the headers property of a message for that message to be routed + (i.e. an AND match) + any implies that the message should be routed if any of the fields in the headers property match one of the + fields in the arguments table (i.e. an OR match) + + A field in the bind arguments matches a field in the message if either the field in the bind arguments has no value and a field of the + same name is present in the message headers or if the field in the bind arguments has a value and a field of the same name exists in the + message headers and has that same value. +
+
Unrouteable Messages If an exchange is unable to route a message to any queues, the Broker will: -- cgit v1.2.1