summaryrefslogtreecommitdiff
path: root/cpp/examples/messaging/topic_sender.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/examples/messaging/topic_sender.cpp')
-rw-r--r--cpp/examples/messaging/topic_sender.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cpp/examples/messaging/topic_sender.cpp b/cpp/examples/messaging/topic_sender.cpp
index 5665fc45f9..d1ada45864 100644
--- a/cpp/examples/messaging/topic_sender.cpp
+++ b/cpp/examples/messaging/topic_sender.cpp
@@ -52,7 +52,8 @@ int main(int argc, char** argv) {
int count = argc>2 ? atoi(argv[2]) : 10;
try {
- Connection connection = Connection::open(url);
+ Connection connection;
+ connection.open(url);
Session session = connection.newSession();
Sender sender = session.createSender("news_service");