| 177 | } |
| 178 | |
| 179 | comm::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 | |
| 193 | comm::RetCode GlobalConfig::GetStoreConfig(const int topic_id, shared_ptr<const StoreConfig> &store_config) { |
| 194 | store_config = nullptr; |