MCPcopy Create free account
hub / github.com/apache/qpid-proton / on_message

Method on_message

cpp/examples/server.cpp:62–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60 }
61
62 void on_message(proton::delivery&, proton::message& m) override {
63 std::cout << "Received " << m.body() << std::endl;
64
65 std::string reply_to = m.reply_to();
66 proton::message reply;
67
68 reply.to(reply_to);
69 reply.body(to_upper(proton::get<std::string>(m.body())));
70 reply.correlation_id(m.correlation_id());
71
72 if (!senders_[reply_to]) {
73 senders_[reply_to] = conn_.open_sender(reply_to);
74 }
75
76 senders_[reply_to].send(reply);
77 }
78};
79
80int main(int argc, char** argv) {

Callers

nothing calls this directly

Calls 6

bodyMethod · 0.80
reply_toMethod · 0.45
toMethod · 0.45
correlation_idMethod · 0.45
open_senderMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected