コード例 #1
0
ファイル: broker.cpp プロジェクト: 850361813/qpid-proton
 // A receiver receives messages from a publisher to a queue.
 void on_receiver_open(proton::receiver &receiver) override {
     std::string qname = receiver.target().address();
     if (qname == "shutdown") {
         std::cout << "broker shutting down" << std::endl;
         // Sending to the special "shutdown" queue stops the broker.
         proton::controller::get(receiver.connection()).stop(
             proton::error_condition("shutdown", "stop broker"));
     } else {
         std::cout << "receiving to " << qname << std::endl;
     }
 }
コード例 #2
0
 void on_receiver_open(proton::receiver& r) override {
     std::cout << r << ": New incoming receiver: target address: " << r.target().address() << "\n";
 }