MCPcopy Create free account
hub / github.com/Tencent/phxqueue / GetQueueInfoIDRankByPub

Method GetQueueInfoIDRankByPub

phxqueue/config/topicconfig.cpp:310–320  ·  view source on GitHub ↗

queue_info ********************/

Source from the content-addressed store, hash-verified

308
309/******************* queue_info ********************/
310comm::RetCode TopicConfig::GetQueueInfoIDRankByPub(const int queue_info_id, const proto::Pub *pub, uint64_t &rank) const {
311 rank = 0;
312 if (nullptr == pub) return comm::RetCode::RET_ERR_UNEXPECTED;
313 for (int i{0}; i < pub->queue_info_ids_size(); ++i) {
314 if (queue_info_id == pub->queue_info_ids(i)) {
315 rank = i;
316 return comm::RetCode::RET_OK;
317 }
318 }
319 return comm::RetCode::RET_ERR_RANGE_QUEUE_INFO;
320}
321
322
323

Callers 2

CheckTopicConfigMethod · 0.80
TestTopicConfigMethod · 0.80

Calls

no outgoing calls

Tested by 2

CheckTopicConfigMethod · 0.64
TestTopicConfigMethod · 0.64