Пример #1
0
 // 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;
     }
 }
 void on_receiver_open(proton::receiver& r) override {
     std::cout << r << ": New incoming receiver: target address: " << r.target().address() << "\n";
 }