summaryrefslogtreecommitdiff
path: root/cpp/examples/messaging/map_sender.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/examples/messaging/map_sender.cpp')
-rw-r--r--cpp/examples/messaging/map_sender.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/examples/messaging/map_sender.cpp b/cpp/examples/messaging/map_sender.cpp
index 50150fa3d5..b6e0621844 100644
--- a/cpp/examples/messaging/map_sender.cpp
+++ b/cpp/examples/messaging/map_sender.cpp
@@ -39,7 +39,8 @@ int main(int argc, char** argv) {
const char* url = argc>1 ? argv[1] : "amqp:tcp:127.0.0.1:5672";
try {
- Connection connection = Connection::open(url);
+ Connection connection;
+ connection.open(url);
Session session = connection.newSession();
Sender sender = session.createSender("message_queue");