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

Method on_message

cpp/examples/server_direct.cpp:88–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86 }
87
88 void on_message(proton::delivery &, proton::message &m) override {
89 std::cout << "Received " << m.body() << std::endl;
90
91 std::string reply_to = m.reply_to();
92 sender_map::iterator it = senders.find(reply_to);
93
94 if (it == senders.end()) {
95 std::cout << "No link for reply_to: " << reply_to << std::endl;
96 } else {
97 proton::sender sender = it->second;
98 proton::message reply;
99
100 reply.to(reply_to);
101 reply.body(to_upper(proton::get<std::string>(m.body())));
102 reply.correlation_id(m.correlation_id());
103
104 sender.send(reply);
105 }
106 }
107};
108
109int main(int argc, char **argv) {

Callers

nothing calls this directly

Calls 7

bodyMethod · 0.80
findMethod · 0.80
reply_toMethod · 0.45
endMethod · 0.45
toMethod · 0.45
correlation_idMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected