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

Method GetConsumerConfig

phxqueue/config/globalconfig.cpp:179–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179comm::RetCode GlobalConfig::GetConsumerConfig(const int topic_id, shared_ptr<const ConsumerConfig> &consumer_config) {
180 consumer_config = nullptr;
181
182 auto &&it = impl_->topic_id2consumer_config.find(topic_id);
183 if (it == impl_->topic_id2consumer_config.end()) {
184 NeedRebuild();
185 return comm::RetCode::RET_ERR_RANGE_TOPIC;
186 }
187 if (!it->second) return comm::RetCode::RET_ERR_RANGE_TOPIC;
188 it->second->Load();
189 consumer_config = it->second;
190 return comm::RetCode::RET_OK;
191}
192
193comm::RetCode GlobalConfig::GetStoreConfig(const int topic_id, shared_ptr<const StoreConfig> &store_config) {
194 store_config = nullptr;

Callers 7

ProcessMethod · 0.80
ReloadConsumerConfigMethod · 0.80
GetAddrScaleMethod · 0.80
ProcessMethod · 0.80
TestGlobalConfigMethod · 0.80
GetAddrScaleMethod · 0.80
GetSubIDsByConsumerAddrFunction · 0.80

Calls 1

LoadMethod · 0.80

Tested by 4

ProcessMethod · 0.64
GetAddrScaleMethod · 0.64
ProcessMethod · 0.64
TestGlobalConfigMethod · 0.64