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();
     }
 }
Beispiel #3
0
 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);
     }
 }
Beispiel #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;
 }