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

Method GetPubByPubID

phxqueue/config/topicconfig.cpp:247–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247comm::RetCode TopicConfig::GetPubByPubID(const int pub_id, shared_ptr<const proto::Pub> &pub) const {
248 pub = nullptr;
249
250 auto &&it = impl_->pub_id2pub.find(pub_id);
251 if (impl_->pub_id2pub.end() == it) {
252 return comm::RetCode::RET_ERR_RANGE_PUB;
253 }
254 pub = it->second;
255
256 return comm::RetCode::RET_OK;
257}
258
259comm::RetCode TopicConfig::GetSubIDsByPubID(const int pub_id, set<int> &sub_ids) const {
260 sub_ids.clear();

Callers 5

CheckTopicConfigMethod · 0.80
TestTopicConfigMethod · 0.80
UpdateLimitInfoMethod · 0.80
GetAllQueuesMethod · 0.80

Calls

no outgoing calls

Tested by 3

CheckTopicConfigMethod · 0.64
TestTopicConfigMethod · 0.64