Author: cctrieloff
Date: Mon Nov 10 09:05:41 2008
New Revision: 712699

URL: http://svn.apache.org/viewvc?rev=712699&view=rev
Log:
QPID-1445 patch from Jonathan

Modified:
    incubator/qpid/trunk/qpid/cpp/examples/direct/declare_queues.cpp
    incubator/qpid/trunk/qpid/cpp/examples/direct/direct_producer.cpp
    incubator/qpid/trunk/qpid/cpp/examples/direct/listener.cpp
    incubator/qpid/trunk/qpid/cpp/examples/fanout/fanout_producer.cpp
    incubator/qpid/trunk/qpid/cpp/examples/fanout/listener.cpp
    incubator/qpid/trunk/qpid/cpp/examples/pub-sub/topic_listener.cpp
    incubator/qpid/trunk/qpid/cpp/examples/pub-sub/topic_publisher.cpp
    incubator/qpid/trunk/qpid/cpp/examples/request-response/client.cpp
    incubator/qpid/trunk/qpid/cpp/examples/request-response/server.cpp
    incubator/qpid/trunk/qpid/cpp/examples/xml-exchange/declare_queues.cpp
    incubator/qpid/trunk/qpid/cpp/examples/xml-exchange/listener.cpp
    incubator/qpid/trunk/qpid/cpp/examples/xml-exchange/xml_producer.cpp

Modified: incubator/qpid/trunk/qpid/cpp/examples/direct/declare_queues.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/examples/direct/declare_queues.cpp?rev=712699&r1=712698&r2=712699&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/examples/direct/declare_queues.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/examples/direct/declare_queues.cpp Mon Nov 10 
09:05:41 2008
@@ -19,24 +19,28 @@
  *
  */
 
+
 /**
  *  declare_queues.cpp
  *
  *  This program is one of three programs designed to be used
- *  together. These programs use the "amq.direct" exchange.
+ *  together. 
  *  
- *  direct_config_queues.cpp (this program):
+ *    declare_queues.cpp: (this program):
  *
- *      Creates a queue on a broker, binding a routing key to route
- *      messages to that queue.
+ *      Creates a queue named "message_queue" on a broker, binding the
+ *      queue to the "amq.direct" exchange, using the routing key
+ *      "routing_key".
  *
- *  direct_producer.cpp:
+ *    direct_producer.cpp
  *
- *      Publishes to a broker, specifying a routing key.
+ *      Publishes to the "amq.direct" exchange, specifying the routing
+ *      key "routing_key"
  *
- *  listener.cpp
+ *    listener.cpp
  *
- *      Reads from a queue on the broker using a message listener.
+ *      Reads  from the "message_queue"  queue on  the broker  using a
+ *      message listener.
  *
  */
 
@@ -56,7 +60,6 @@
 int main(int argc, char** argv) {
     const char* host = argc>1 ? argv[1] : "127.0.0.1";
     int port = argc>2 ? atoi(argv[2]) : 5672;
-    string exchange(argc>3 ? argv[3] : "amq.direct");
     Connection connection;
 
     try {
@@ -70,7 +73,7 @@
       // routing key is "routing_key" to this newly created queue.
 
       session.queueDeclare(arg::queue="message_queue");
-      session.exchangeBind(arg::exchange=exchange, arg::queue="message_queue", 
arg::bindingKey="routing_key");
+      session.exchangeBind(arg::exchange="amq.direct", 
arg::queue="message_queue", arg::bindingKey="routing_key");
 
   
//-----------------------------------------------------------------------------
 

Modified: incubator/qpid/trunk/qpid/cpp/examples/direct/direct_producer.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/examples/direct/direct_producer.cpp?rev=712699&r1=712698&r2=712699&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/examples/direct/direct_producer.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/examples/direct/direct_producer.cpp Mon Nov 
10 09:05:41 2008
@@ -19,26 +19,27 @@
  *
  */
 
-
 /**
  *  direct_producer.cpp:
  *
  *  This program is one of three programs designed to be used
- *  together. These programs do not specify the exchange type - the
- *  default exchange type is the direct exchange.
+ *  together. 
  *  
  *    create_queues.cpp:
  *
- *      Creates a queue on a broker, binding a routing key to route
- *      messages to that queue.
+ *      Creates a queue named "message_queue" on a broker, binding the
+ *      queue to the "amq.direct" exchange, using the routing key
+ *      "routing_key".
  *
  *    direct_producer.cpp (this program):
  *
- *      Publishes to a broker, specifying a routing key.
+ *      Publishes to the "amq.direct" exchange, specifying the routing
+ *      key "routing_key"
  *
  *    listener.cpp
  *
- *      Reads from a queue on the broker using a message listener.
+ *      Reads  from the "message_queue"  queue on  the broker  using a
+ *      message listener.
  *
  */
 
@@ -65,7 +66,7 @@
     const char* host = argc>1 ? argv[1] : "127.0.0.1";
     int port = argc>2 ? atoi(argv[2]) : 5672;
     int count = argc>3 ? atoi(argv[3]) : 10;
-    string exchange(argc>4 ? argv[4] : "amq.direct");
+  
     Connection connection;
     Message message;
     try {
@@ -88,16 +89,13 @@
          message_data << "Message " << i;
 
          message.setData(message_data.str());
-          // Asynchronous transfer sends messages as quickly as
-          // possible without waiting for confirmation.
-          // async(session).messageTransfer(arg::content=message,  
arg::destination=exchange);
-          session.messageTransfer(arg::content=message,  
arg::destination=exchange);
+          session.messageTransfer(arg::content=message,  
arg::destination="amq.direct");
        }
        
        // And send a final message to indicate termination.
 
        message.setData("That's all, folks!");
-        session.messageTransfer(arg::content=message,  
arg::destination=exchange); 
+        session.messageTransfer(arg::content=message,  
arg::destination="amq.direct"); 
 
   
//-----------------------------------------------------------------------------
 

Modified: incubator/qpid/trunk/qpid/cpp/examples/direct/listener.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/examples/direct/listener.cpp?rev=712699&r1=712698&r2=712699&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/examples/direct/listener.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/examples/direct/listener.cpp Mon Nov 10 
09:05:41 2008
@@ -20,10 +20,29 @@
  */
 
 /**
- *  listener.cpp: This program reads messages from a queue on
- *  the broker using a message listener.
+ *  listener.cpp: 
+ *
+ *  This program is one of three programs designed to be used
+ *  together. 
+ *  
+ *    create_queues.cpp:
+ *
+ *      Creates a queue named "message_queue" on a broker, binding the
+ *      queue to the "amq.direct" exchange, using the routing key
+ *      "routing_key".
+ *
+ *    direct_producer.cpp 
+ *
+ *      Publishes to the "amq.direct" exchange, specifying the routing
+ *      key "routing_key"
+ *
+ *    listener.cpp (this program):
+ *
+ *      Reads  from the "message_queue"  queue on  the broker  using a
+ *      message listener.
  */
 
+
 #include <qpid/client/Connection.h>
 #include <qpid/client/Session.h>
 #include <qpid/client/Message.h>

Modified: incubator/qpid/trunk/qpid/cpp/examples/fanout/fanout_producer.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/examples/fanout/fanout_producer.cpp?rev=712699&r1=712698&r2=712699&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/examples/fanout/fanout_producer.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/examples/fanout/fanout_producer.cpp Mon Nov 
10 09:05:41 2008
@@ -23,22 +23,21 @@
 /**
  *  fanout_producer.cpp:
  *
- *  This program is one of three programs designed to be used
- *  together. These programs do not specify the exchange type - the
- *  default exchange type is the direct exchange.
- *  
- *    declare_queues.cpp:
- *
- *      Creates a queue on a broker, binding a routing key to route
- *      messages to that queue.
+ *  This program is one of two programs designed to be used
+ *  together.
  *
  *    fanout_producer.cpp (this program):
  *
- *      Publishes to a broker, specifying a routing key.
+ *      Publishes messages to the "amq.fanout" exchange.
  *
  *    listener.cpp
  *
- *      Reads from a queue on the broker using a message listener.
+ *      Creates a private queue, binds it to the "amq.fanout"
+ *      exchange, and reads messages from its queue as they
+ *      arrive. Messages sent before the listener binds the queue are
+ *      not received.
+ *
+ *      Multiple listeners can run at the same time.
  *
  */
 
@@ -64,7 +63,7 @@
 int main(int argc, char** argv) {
     const char* host = argc>1 ? argv[1] : "127.0.0.1";
     int port = argc>2 ? atoi(argv[2]) : 5672;
-    string exchange = argc>3 ? argv[3] : "amq.fanout";
+
     Connection connection;
     Message message;
     try {
@@ -87,13 +86,13 @@
          message.setData(message_data.str());
           // Asynchronous transfer sends messages as quickly as
           // possible without waiting for confirmation.
-          async(session).messageTransfer(arg::content=message, 
arg::destination=exchange);
+          async(session).messageTransfer(arg::content=message, 
arg::destination="amq.fanout");
        }
        
        // And send a final message to indicate termination.
 
        message.setData("That's all, folks!");
-        session.messageTransfer(arg::content=message, 
arg::destination=exchange);
+        session.messageTransfer(arg::content=message, 
arg::destination="amq.fanout");
 
   
//-----------------------------------------------------------------------------
 

Modified: incubator/qpid/trunk/qpid/cpp/examples/fanout/listener.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/examples/fanout/listener.cpp?rev=712699&r1=712698&r2=712699&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/examples/fanout/listener.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/examples/fanout/listener.cpp Mon Nov 10 
09:05:41 2008
@@ -19,11 +19,29 @@
  *
  */
 
+
 /**
- *  listener.cpp: This program reads messages fro a queue on
- *  the broker using a message listener.
+ *  listener.cpp
+ *
+ *  This program is one of two programs designed to be used
+ *  together.
+ *
+ *    fanout_producer.cpp
+ *
+ *      Publishes messages to the "amq.fanout" exchange.
+ *
+ *    listener.cpp  (this program)
+ *
+ *      Creates a private queue, binds it to the "amq.fanout"
+ *      exchange, and reads messages from its queue as they
+ *      arrive. Messages sent before the listener binds the queue are
+ *      not received.
+ *
+ *      Multiple listeners can run at the same time.
+ *
  */
 
+
 #include <qpid/client/Connection.h>
 #include <qpid/client/Session.h>
 #include <qpid/client/Message.h>
@@ -60,7 +78,7 @@
 int main(int argc, char** argv) {
     const char* host = argc>1 ? argv[1] : "127.0.0.1";
     int port = argc>2 ? atoi(argv[2]) : 5672;
-    string exchange = argc>3 ? argv[3] : "amq.fanout";
+
     Connection connection;
     Message msg;
     try {
@@ -83,7 +101,7 @@
         session.queueDeclare(arg::queue=myQueue, arg::exclusive=true,
                              arg::autoDelete=true);
 
-        session.exchangeBind(arg::exchange=exchange, arg::queue=myQueue, 
arg::bindingKey="my-key");
+        session.exchangeBind(arg::exchange="amq.fanout", arg::queue=myQueue, 
arg::bindingKey="my-key");
 
         // Create a listener and subscribe it to my queue.
         SubscriptionManager subscriptions(session);

Modified: incubator/qpid/trunk/qpid/cpp/examples/pub-sub/topic_listener.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/examples/pub-sub/topic_listener.cpp?rev=712699&r1=712698&r2=712699&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/examples/pub-sub/topic_listener.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/examples/pub-sub/topic_listener.cpp Mon Nov 
10 09:05:41 2008
@@ -22,21 +22,24 @@
 /**
  *  topic_listener.cpp:
  *
- *  This program is one of three programs designed to be used
- *  together. These programs use the topic exchange.
- *  
- *    topic_config_queues.cpp:
+ *  This program is one of two programs designed to be used
+ *  together. These programs implement a publish-subscribe example
+ *  using the "amq.topic" exchange.
  *
- *      Creates a queue on a broker, binding a routing key to route
- *      messages to that queue.
+ *   topic_publisher.cpp 
  *
- *    topic_publisher.cpp:
+ *      Sends messages to the "amq.topic" exchange, using the
+ *      multipart routing keys "usa.news", "usa.weather",
+ *      "europe.news", and "europe.weather".
  *
- *      Publishes to a broker, specifying a routing key.
+ *   topic_listener.cpp (this program)
  *
- *    topic_listener.cpp (this program):
+ *      Creates private queues for "news", "weather", "usa", and
+ *      "europe", binding them to the amq.topic exchange using
+ *      bindings that match the corresponding parts of the multipart
+ *      routing keys.
  *
- *      Reads from a queue on the broker using a message listener.
+ *      Multiple listeners can be run at the same time.
  *
  */
 

Modified: incubator/qpid/trunk/qpid/cpp/examples/pub-sub/topic_publisher.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/examples/pub-sub/topic_publisher.cpp?rev=712699&r1=712698&r2=712699&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/examples/pub-sub/topic_publisher.cpp 
(original)
+++ incubator/qpid/trunk/qpid/cpp/examples/pub-sub/topic_publisher.cpp Mon Nov 
10 09:05:41 2008
@@ -19,25 +19,27 @@
  *
  */
 
-
 /**
  *  topic_publisher.cpp:
  *
- *  This program is one of three programs designed to be used
- *  together. These programs use the topic exchange.
- *  
- *    topic_config_queues.cpp:
+ *  This program is one of two programs designed to be used
+ *  together. These programs implement a publish-subscribe example
+ *  using the "amq.topic" exchange.
  *
- *      Creates a queue on a broker, binding a routing key to route
- *      messages to that queue.
+ *   topic_publisher.cpp (this program)
  *
- *    topic_publisher.cpp (this program):
+ *      Sends messages to the "amq.topic" exchange, using the
+ *      multipart routing keys "usa.news", "usa.weather",
+ *      "europe.news", and "europe.weather".
  *
- *      Publishes to a broker, specifying a routing key.
+ *   topic_listener.cpp 
  *
- *    topic_listener.cpp
+ *      Creates private queues for "news", "weather", "usa", and
+ *      "europe", binding them to the amq.topic exchange using
+ *      bindings that match the corresponding parts of the multipart
+ *      routing keys.
  *
- *      Reads from a queue on the broker using a message listener.
+ *      Multiple listeners can be run at the same time.
  *
  */
 
@@ -60,7 +62,7 @@
 using std::stringstream;
 using std::string;
 
-void publish_messages(Session& session, string exchange, string routing_key)
+void publish_messages(Session& session, string routing_key)
 {
   Message message;
 
@@ -75,7 +77,7 @@
     message.setData(message_data.str());
     // Asynchronous transfer sends messages as quickly as
     // possible without waiting for confirmation.
-    async(session).messageTransfer(arg::content=message, 
arg::destination=exchange);
+    async(session).messageTransfer(arg::content=message, 
arg::destination="amq.topic");
   }
 
 }
@@ -88,19 +90,19 @@
  *
  */
 
-void no_more_messages(Session& session, string exchange)
+void no_more_messages(Session& session)
 {
   Message message;
 
   message.getDeliveryProperties().setRoutingKey("control"); 
   message.setData("That's all, folks!");
-  session.messageTransfer(arg::content=message, arg::destination=exchange); 
+  session.messageTransfer(arg::content=message, arg::destination="amq.topic"); 
 }
 
 int main(int argc, char** argv) {
     const char* host = argc>1 ? argv[1] : "127.0.0.1";
     int port = argc>2 ? atoi(argv[2]) : 5672;
-    std::string exchange = argc>3 ? argv[3] : "amq.topic";
+
     Connection connection;
     Message message;
     try {
@@ -109,12 +111,12 @@
 
   //--------- Main body of program --------------------------------------------
 
-        publish_messages(session, exchange, "usa.news");
-        publish_messages(session, exchange, "usa.weather");
-        publish_messages(session, exchange, "europe.news");
-        publish_messages(session, exchange, "europe.weather");
+        publish_messages(session, "usa.news");
+        publish_messages(session, "usa.weather");
+        publish_messages(session, "europe.news");
+        publish_messages(session, "europe.weather");
 
-        no_more_messages(session, exchange);
+        no_more_messages(session);
 
   
//-----------------------------------------------------------------------------
 

Modified: incubator/qpid/trunk/qpid/cpp/examples/request-response/client.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/examples/request-response/client.cpp?rev=712699&r1=712698&r2=712699&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/examples/request-response/client.cpp 
(original)
+++ incubator/qpid/trunk/qpid/cpp/examples/request-response/client.cpp Mon Nov 
10 09:05:41 2008
@@ -26,14 +26,32 @@
  *  This program is one of two programs that illustrate the
  *  request/response pattern.
  *  
- *    client.cpp (this program)
  *
- *      Make requests of a service, print the response.
+ *  client.cpp  (this program) 
+ *   
+ *     A client application that sends messages to the "amq.direct"
+ *     exchange, using the routing key "request" to route messages to
+ *     the server.
  *
- *    service.cpp
+ *     Each instance of the client creates its own private response
+ *     queue, binding it to the "amq.direct" exchange using it's
+ *     session identifier as the routing key, and places its session
+ *     identifier in the "reply-to" property of each message it sends.
+ *
+ *
+ *  server.cpp
+ *
+ *     A service that accepts messages from a request queue, converts
+ *     their content to upper case, and sends the result to the
+ *     original sender.
+ *
+ *     This program creates a request queue, binds it to "amq.direct"
+ *     using the routing key "request", then receives messages from
+ *     the request queue. Each incoming message is converted to upper
+ *     case, then sent to the "amq.direct" exchange using the
+ *     request's reply-to property as the routing key for the
+ *     response.
  *
- *      Accept requests, reverse the letters in each message, and
- *      return it as a response.
  *
  */
 

Modified: incubator/qpid/trunk/qpid/cpp/examples/request-response/server.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/examples/request-response/server.cpp?rev=712699&r1=712698&r2=712699&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/examples/request-response/server.cpp 
(original)
+++ incubator/qpid/trunk/qpid/cpp/examples/request-response/server.cpp Mon Nov 
10 09:05:41 2008
@@ -26,14 +26,32 @@
  *  This program is one of two programs that illustrate the
  *  request/response pattern.
  *  
- *    client.cpp 
  *
- *      Make requests of a service, print the response.
+ *  client.cpp 
+ *   
+ *     A client application that sends messages to the "amq.direct"
+ *     exchange, using the routing key "request" to route messages to
+ *     the server.
  *
- *    server.cpp (this program)
+ *     Each instance of the client creates its own private response
+ *     queue, binding it to the "amq.direct" exchange using it's
+ *     session identifier as the routing key, and places its session
+ *     identifier in the "reply-to" property of each message it sends.
+ *
+ *
+ *  server.cpp (this program)
+ *
+ *     A service that accepts messages from a request queue, converts
+ *     their content to upper case, and sends the result to the
+ *     original sender.
+ *
+ *     This program creates a request queue, binds it to "amq.direct"
+ *     using the routing key "request", then receives messages from
+ *     the request queue. Each incoming message is converted to upper
+ *     case, then sent to the "amq.direct" exchange using the
+ *     request's reply-to property as the routing key for the
+ *     response.
  *
- *      Accept requests, reverse the letters in each message, and
- *      return it as a response.
  *
  */
 

Modified: incubator/qpid/trunk/qpid/cpp/examples/xml-exchange/declare_queues.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/examples/xml-exchange/declare_queues.cpp?rev=712699&r1=712698&r2=712699&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/examples/xml-exchange/declare_queues.cpp 
(original)
+++ incubator/qpid/trunk/qpid/cpp/examples/xml-exchange/declare_queues.cpp Mon 
Nov 10 09:05:41 2008
@@ -19,6 +19,29 @@
  *
  */
 
+
+/**
+ *
+ * declare_queues.cpp
+ *
+ * This is one of three programs used to implement XML-based content
+ * routing in C++.
+ *
+ * declare_queues.cpp (this program)
+ *
+ *       Creates a queue named "message_qaueue" on the broker,
+ *       declares an XML Exchange, subscribes the queue to the XML
+ *       Exchange using an XQuery in the binding, then exits.
+ *
+ * xml_producer.cpp 
+ *
+ *       Publishes messages to the XML Exchange.
+ *
+ * listener.cpp
+ *
+ *       Reads messages from the "message_queue" queue.
+ */
+
 #include <qpid/client/Connection.h>
 #include <qpid/client/Session.h>
 
@@ -59,7 +82,7 @@
       FieldTable binding;
       binding.setString("xquery", "declare variable $control external;"
                                  "./message/id mod 2 = 1 or $control = 'end'");
-      session.exchangeBind(arg::exchange="xml", arg::queue="message_queue", 
arg::bindingKey="query_name", arg::arguments=binding); 
+      session.exchangeBind(arg::exchange="xml", arg::queue="message_queue", 
arg::bindingKey="content_feed", arg::arguments=binding); 
 
   
//-----------------------------------------------------------------------------
 

Modified: incubator/qpid/trunk/qpid/cpp/examples/xml-exchange/listener.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/examples/xml-exchange/listener.cpp?rev=712699&r1=712698&r2=712699&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/examples/xml-exchange/listener.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/examples/xml-exchange/listener.cpp Mon Nov 10 
09:05:41 2008
@@ -19,11 +19,30 @@
  *
  */
 
+
 /**
- *  listener.cpp: This program reads messages fro a queue on
- *  the broker using a message listener.
+ *
+ * listener.cpp
+ *
+ * This is one of three programs used to implement XML-based content
+ * routing in C++.
+ *
+ * declare_queues.cpp 
+ *
+ *       Creates a queue named "message_qaueue" on the broker,
+ *       declares an XML Exchange, subscribes the queue to the XML
+ *       Exchange using an XQuery in the binding, then exits.
+ *
+ * xml_producer.cpp 
+ *
+ *       Publishes messages to the XML Exchange.
+ *
+ * listener.cpp (this program)
+ *
+ *       Reads messages from the "message_queue" queue.
  */
 
+
 #include <qpid/client/Connection.h>
 #include <qpid/client/Session.h>
 #include <qpid/client/Message.h>

Modified: incubator/qpid/trunk/qpid/cpp/examples/xml-exchange/xml_producer.cpp
URL: 
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/examples/xml-exchange/xml_producer.cpp?rev=712699&r1=712698&r2=712699&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/examples/xml-exchange/xml_producer.cpp 
(original)
+++ incubator/qpid/trunk/qpid/cpp/examples/xml-exchange/xml_producer.cpp Mon 
Nov 10 09:05:41 2008
@@ -20,6 +20,29 @@
  */
 
 
+/**
+ *
+ * xml_producer.cpp
+ *
+ * This is one of three programs used to implement XML-based content
+ * routing in C++.
+ *
+ * declare_queues.cpp 
+ *
+ *       Creates a queue named "message_qaueue" on the broker,
+ *       declares an XML Exchange, subscribes the queue to the XML
+ *       Exchange using an XQuery in the binding, then exits.
+ *
+ * xml_producer.cpp (this program)
+ *
+ *       Publishes messages to the XML Exchange.
+ *
+ * listener.cpp
+ *
+ *       Reads messages from the "message_queue" queue.
+ */
+
+
 #include <qpid/client/Connection.h>
 #include <qpid/client/Session.h>
 #include <qpid/client/AsyncSession.h>
@@ -55,7 +78,7 @@
        // In the XML exchange, the routing key and the name of
        // the query match.
 
-       message.getDeliveryProperties().setRoutingKey("query_name"); 
+       message.getDeliveryProperties().setRoutingKey("content_feed"); 
        message.getHeaders().setString("control","continue");
 
        // Now send some messages ...


Reply via email to