NO-JIRA: cpp example broker, set source address
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/cdc1baa2 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/cdc1baa2 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/cdc1baa2 Branch: refs/heads/master Commit: cdc1baa2ecfe5c38ffd6859c97428debc0282002 Parents: b1a2925 Author: Alan Conway <[email protected]> Authored: Sat Nov 12 00:51:46 2016 -0500 Committer: Alan Conway <[email protected]> Committed: Wed Nov 16 19:48:31 2016 -0500 ---------------------------------------------------------------------- examples/cpp/mt/broker.cpp | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/cdc1baa2/examples/cpp/mt/broker.cpp ---------------------------------------------------------------------- diff --git a/examples/cpp/mt/broker.cpp b/examples/cpp/mt/broker.cpp index 39d7132..7ef90c3 100644 --- a/examples/cpp/mt/broker.cpp +++ b/examples/cpp/mt/broker.cpp @@ -26,6 +26,8 @@ #include <proton/error_condition.hpp> #include <proton/listen_handler.hpp> #include <proton/messaging_handler.hpp> +#include <proton/sender_options.hpp> +#include <proton/source_options.hpp> #include <proton/thread_safe.hpp> #include <atomic> @@ -151,6 +153,7 @@ class broker_connection_handler : public proton::messaging_handler { void on_sender_open(proton::sender &sender) OVERRIDE { queue *q = sender.source().dynamic() ? queues_.dynamic() : queues_.get(sender.source().address()); + sender.open(proton::sender_options().source((proton::source_options().address(q->name())))); std::cout << "sending from " << q->name() << std::endl; } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
