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

Method findQueue

cpp/examples/broker.cpp:305–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303
304 template <class T>
305 void findQueue(T& connection, std::string& qn) {
306 if (qn.empty()) {
307 // Dynamic queue creation
308 std::ostringstream os;
309 os << "_dynamic_" << next_id_++;
310 qn = os.str();
311 }
312 Queue* q = 0;
313 auto i = queues_.find(qn);
314 if (i==queues_.end()) {
315 q = new Queue(container_, qn);
316 queues_[qn] = q;
317 } else {
318 q = i->second;
319 }
320 connection.add([=, &connection] {connection.boundQueue(q, qn);});
321 }
322
323 void queueMessage(proton::message m, std::string address) {
324 Queue* q = 0;

Callers

nothing calls this directly

Calls 6

findMethod · 0.80
emptyMethod · 0.45
strMethod · 0.45
endMethod · 0.45
addMethod · 0.45
boundQueueMethod · 0.45

Tested by

no test coverage detected