From f196d935659155427388be9f36de8d6585ff22d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20=C5=A0ustr?= Date: Tue, 12 Apr 2011 20:34:34 +0000 Subject: [PATCH] Allow listening for topics other than 'topic' --- org.glite.lb.logger-msg/examples/cmsclient.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/org.glite.lb.logger-msg/examples/cmsclient.cpp b/org.glite.lb.logger-msg/examples/cmsclient.cpp index 26aea16..d2bdd51 100644 --- a/org.glite.lb.logger-msg/examples/cmsclient.cpp +++ b/org.glite.lb.logger-msg/examples/cmsclient.cpp @@ -212,8 +212,8 @@ private: //////////////////////////////////////////////////////////////////////////////// int main(int argc AMQCPP_UNUSED, char* argv[] AMQCPP_UNUSED) { - if (argc <= 1) { - printf("Usage: %s BROKER\n", argv[0]); + if (argc <= 2) { + printf("Usage: %s \n", argv[0]); return 1; } @@ -242,6 +242,7 @@ int main(int argc AMQCPP_UNUSED, char* argv[] AMQCPP_UNUSED) { std::string brokerURI = "failover:(tcp://"; brokerURI += argv[1]; brokerURI += ")"; + // std::string brokerURI = // "failover:(tcp://harad.ics.muni.cz:61616" // "?wireFormat=openwire" @@ -256,7 +257,7 @@ int main(int argc AMQCPP_UNUSED, char* argv[] AMQCPP_UNUSED) { // customize where the consumer listens, to have the consumer // use a topic or queue set the 'useTopics' flag. //============================================================ - std::string destURI = "topic"; //?consumer.prefetchSize=1"; + std::string destURI = argv[2]; //?consumer.prefetchSize=1"; //============================================================ // set to true to use topics instead of queues -- 1.8.2.3