void on_message(proton::event &e) { std::cout << "Received " << e.message().body() << std::endl; std::string reply_to = e.message().reply_to(); proton::message reply; reply.address(reply_to); reply.body(to_upper(e.message().body().get<std::string>())); reply.correlation_id(e.message().correlation_id()); if (!senders[reply_to]) { senders[reply_to] = connection.open_sender(reply_to); } senders[reply_to].send(reply); }
void on_connection_open(proton::connection &c) override { c.open_sender(url.path()); }
void on_connection_open(proton::event &e, proton::connection &c) override { sender = c.open_sender(url.path()); receiver = c.open_receiver("", proton::link_options().dynamic_address(true)); }