From 375ec81692fd7891cbc766bd86366143c985a3c6 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Wed, 5 May 2010 14:22:25 +0000 Subject: Allow empty subject for direct- and xml- exchanges git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@941306 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/examples/messaging/spout.cpp | 1 - cpp/src/qpid/client/amqp0_10/AddressResolution.cpp | 10 ++++++--- doc/book/src/Programming-In-Apache-Qpid.xml | 25 +++++++++++----------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/cpp/examples/messaging/spout.cpp b/cpp/examples/messaging/spout.cpp index 275ca416bc..05d66f60e6 100644 --- a/cpp/examples/messaging/spout.cpp +++ b/cpp/examples/messaging/spout.cpp @@ -160,7 +160,6 @@ int main(int argc, char** argv) spoutid << id << ":" << count; message.getProperties()["spout-id"] = spoutid.str(); sender.send(message); - std::cout << "Sent " << (count+1) << " of " << options.count << " messages" < - A source address that resolves to a direct exchange must - either contain a subject or must include a value for the - x-bindings option in the link properties. This is because - there is no way to receive all messages sent to an - exchange of that type. The subject specified is used as - the binding key (this means it must match the message - subject exactly). + For a direct exchange, the subject is used as the binding + key. If no subject is specified an empty string is used as + the binding key. @@ -1735,12 +1731,15 @@ else matches any message with that value for qpid.subject. Again this means that only messages whose subject exactly match that specified in the source address - are received. For more control the x-bindings element in - the link properties must be used. A source address that - resolves to the XML exchange must contain either a subject - or an x-bindings element in the link properties as there - is no way at present to receive any message regardless of - routing key. + are received. If no subject is specified then the empty + string is used as the binding key with an xquery that will + match any message (this means that only messages with an + empty string as the routing key will be received). For more + control the x-bindings element in the link properties must + be used. A source address that resolves to the XML + exchange must contain either a subject or an x-bindings + element in the link properties as there is no way at + present to receive any message regardless of routing key. -- cgit v1.2.1