diff options
Diffstat (limited to 'cpp/examples/messaging')
-rw-r--r-- | cpp/examples/messaging/map_sender.cpp | 3 | ||||
-rw-r--r-- | cpp/examples/messaging/queue_sender.cpp | 3 | ||||
-rw-r--r-- | cpp/examples/messaging/topic_sender.cpp | 3 |
3 files changed, 3 insertions, 6 deletions
diff --git a/cpp/examples/messaging/map_sender.cpp b/cpp/examples/messaging/map_sender.cpp index 8c85510717..8dba47ce63 100644 --- a/cpp/examples/messaging/map_sender.cpp +++ b/cpp/examples/messaging/map_sender.cpp @@ -56,8 +56,7 @@ int main(int argc, char** argv) { content["uuid"] = Uuid(true); encode(content, message); - sender.send(message); - session.sync(); + sender.send(message, true); connection.close(); return 0; diff --git a/cpp/examples/messaging/queue_sender.cpp b/cpp/examples/messaging/queue_sender.cpp index 0d86f024b3..f7f0e9bf6d 100644 --- a/cpp/examples/messaging/queue_sender.cpp +++ b/cpp/examples/messaging/queue_sender.cpp @@ -48,8 +48,7 @@ int main(int argc, char** argv) { } // And send a final message to indicate termination. - sender.send(Message("That's all, folks!")); - session.sync(); + sender.send(Message("That's all, folks!"), true); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; diff --git a/cpp/examples/messaging/topic_sender.cpp b/cpp/examples/messaging/topic_sender.cpp index 6b1f85ec6f..5dd593ff8a 100644 --- a/cpp/examples/messaging/topic_sender.cpp +++ b/cpp/examples/messaging/topic_sender.cpp @@ -66,8 +66,7 @@ int main(int argc, char** argv) { // And send a final message to indicate termination. Message message("That's all, folks!"); message.setSubject("control"); - sender.send(message); - session.sync(); + sender.send(message, true); connection.close(); return 0; } catch(const std::exception& error) { |