summaryrefslogtreecommitdiff
path: root/qpid/cpp/examples/direct/declare_queues.cpp
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2008-10-24 00:45:11 +0000
committerTed Ross <tross@apache.org>2008-10-24 00:45:11 +0000
commitd33da71d0e2dbf23345c6bd45895eb918739c0c5 (patch)
treef820c248a9aa8bae3826811bb9fca8d970e993f5 /qpid/cpp/examples/direct/declare_queues.cpp
parent8a17f96b1254b5a827726e892edaf373d00dd0b8 (diff)
downloadqpid-python-d33da71d0e2dbf23345c6bd45895eb918739c0c5.tar.gz
QPID-1348 - Dynamic binding for federation. Parameterized exchange names for CPP examples
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@707515 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/examples/direct/declare_queues.cpp')
-rw-r--r--qpid/cpp/examples/direct/declare_queues.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qpid/cpp/examples/direct/declare_queues.cpp b/qpid/cpp/examples/direct/declare_queues.cpp
index 0cdb472665..3289efb872 100644
--- a/qpid/cpp/examples/direct/declare_queues.cpp
+++ b/qpid/cpp/examples/direct/declare_queues.cpp
@@ -56,6 +56,7 @@ using std::string;
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 {
@@ -69,7 +70,7 @@ int main(int argc, char** argv) {
// routing key is "routing_key" to this newly created queue.
session.queueDeclare(arg::queue="message_queue");
- session.exchangeBind(arg::exchange="amq.direct", arg::queue="message_queue", arg::bindingKey="routing_key");
+ session.exchangeBind(arg::exchange=exchange, arg::queue="message_queue", arg::bindingKey="routing_key");
//-----------------------------------------------------------------------------