summaryrefslogtreecommitdiff
path: root/cpp/examples/messaging
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/examples/messaging')
-rw-r--r--cpp/examples/messaging/drain.cpp4
-rw-r--r--cpp/examples/messaging/server.cpp4
-rw-r--r--cpp/examples/messaging/spout.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/cpp/examples/messaging/drain.cpp b/cpp/examples/messaging/drain.cpp
index 5c938e9742..563e5e5060 100644
--- a/cpp/examples/messaging/drain.cpp
+++ b/cpp/examples/messaging/drain.cpp
@@ -45,12 +45,12 @@ struct Options : OptionParser
url("127.0.0.1"),
timeout(0),
forever(false),
- count(1)
+ count(0)
{
add("broker,b", url, "url of broker to connect to");
add("timeout,t", timeout, "timeout in seconds to wait before exiting");
add("forever,f", forever, "ignore timeout and wait forever");
- add("connection-options", connectionOptions, "connection options string in the form {name1=value1, name2=value2}");
+ add("connection-options", connectionOptions, "connection options string in the form {name1:value1, name2:value2}");
add("count,c", count, "number of messages to read before exiting");
}
diff --git a/cpp/examples/messaging/server.cpp b/cpp/examples/messaging/server.cpp
index ab72694c61..aa271d91f9 100644
--- a/cpp/examples/messaging/server.cpp
+++ b/cpp/examples/messaging/server.cpp
@@ -39,8 +39,8 @@ using std::string;
int main(int argc, char** argv) {
const char* url = argc>1 ? argv[1] : "amqp:tcp:127.0.0.1:5672";
- std::string connectionOptions = argc > 3 ? argv[3] : "";
-
+ std::string connectionOptions = argc > 2 ? argv[2] : "";
+
Connection connection(url, connectionOptions);
try {
connection.open();
diff --git a/cpp/examples/messaging/spout.cpp b/cpp/examples/messaging/spout.cpp
index 57b955c1de..cd11a7ad81 100644
--- a/cpp/examples/messaging/spout.cpp
+++ b/cpp/examples/messaging/spout.cpp
@@ -65,7 +65,7 @@ struct Options : OptionParser
add("property,P", properties, "specify message property");
add("map,M", entries, "specify entry for map content");
add("content", content, "specify textual content");
- add("connection-options", connectionOptions, "connection options string in the form {name1=value1, name2=value2}");
+ add("connection-options", connectionOptions, "connection options string in the form {name1:value1, name2:value2}");
}
static bool nameval(const std::string& in, std::string& name, std::string& value)