qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r965424 - in /qpid/trunk/qpid/cpp/examples/messaging: map_receiver.cpp map_sender.cpp
Date Mon, 19 Jul 2010 11:00:46 GMT
Author: gsim
Date: Mon Jul 19 11:00:45 2010
New Revision: 965424

URL: http://svn.apache.org/viewvc?rev=965424&view=rev
Log:
Make address used for map sender/receiver configurable; make default create the queue automatically.

Modified:
    qpid/trunk/qpid/cpp/examples/messaging/map_receiver.cpp
    qpid/trunk/qpid/cpp/examples/messaging/map_sender.cpp

Modified: qpid/trunk/qpid/cpp/examples/messaging/map_receiver.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/messaging/map_receiver.cpp?rev=965424&r1=965423&r2=965424&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/examples/messaging/map_receiver.cpp (original)
+++ qpid/trunk/qpid/cpp/examples/messaging/map_receiver.cpp Mon Jul 19 11:00:45 2010
@@ -37,12 +37,13 @@ using std::string;
 
 int main(int argc, char** argv) {
     const char* url = argc>1 ? argv[1] : "amqp:tcp:127.0.0.1:5672";
+    const char* address = argc>2 ? argv[2] : "message_queue; {create: always}";
 
     Connection connection(url);
     try {
         connection.open();
         Session session = connection.createSession();
-        Receiver receiver = session.createReceiver("message_queue");
+        Receiver receiver = session.createReceiver(address);
         Variant::Map content;
         decode(receiver.fetch(), content);
         std::cout << content << std::endl;

Modified: qpid/trunk/qpid/cpp/examples/messaging/map_sender.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/messaging/map_sender.cpp?rev=965424&r1=965423&r2=965424&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/examples/messaging/map_sender.cpp (original)
+++ qpid/trunk/qpid/cpp/examples/messaging/map_sender.cpp Mon Jul 19 11:00:45 2010
@@ -37,11 +37,12 @@ using std::string;
 
 int main(int argc, char** argv) {
     const char* url = argc>1 ? argv[1] : "amqp:tcp:127.0.0.1:5672";
+    const char* address = argc>2 ? argv[2] : "message_queue; {create: always}";
     Connection connection(url);
     try {
         connection.open();
         Session session = connection.createSession();
-        Sender sender = session.createSender("message_queue");
+        Sender sender = session.createSender(address);
 
         Message message;
         Variant::Map content;



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message