예제 #1
0
 void on_sender_open(proton::sender &sender) override {
     if (sender.source().dynamic()) {
         std::string addr = generate_address();
         sender.open(proton::sender_options().source(proton::source_options().address(addr)));
         senders[addr] = sender;
     }
 }
 void on_sender_open(proton::sender& s) override {
     auto a = s.source().address();
     std::cout << s << ": New incoming sender: source address: " << a << "\n";
     if (a==c_quit) {
         s.container().stop();
     }
 }
예제 #3
0
파일: broker.cpp 프로젝트: Karm/qpid-proton
 void unsubscribe (proton::sender &lnk) {
     std::string address = lnk.source().address();
     queue_map::iterator it = queues.find(address);
     if (it != queues.end() && it->second->unsubscribe(lnk)) {
         delete it->second;
         queues.erase(it);
     }
 }
예제 #4
0
 // A sender sends messages from a queue to a subscriber.
 void on_sender_open(proton::sender &sender) override {
     queue *q = sender.source().dynamic() ?
         queues_.dynamic() : queues_.get(sender.source().address());
     std::cout << "sending from " << q->name() << std::endl;
 }