GitHub user john1337 added a comment to the discussion: 5.3.4版本什么时候发版啊
具体报错的地方在AdminBrokerProcessor getTopic方法
private RemotingCommand getTopicConfig(ChannelHandlerContext ctx,
RemotingCommand request) throws RemotingCommandException {
GetTopicConfigRequestHeader requestHeader =
(GetTopicConfigRequestHeader)
request.decodeCommandCustomHeader(GetTopicConfigRequestHeader.class);
final RemotingCommand response =
RemotingCommand.createResponseCommand(null);
// 问题出处,本地缓存没有topicconfig数据直接就返回失败了
TopicConfig topicConfig =
this.brokerController.getTopicConfigManager().selectTopicConfig(requestHeader.getTopic());
if (topicConfig == null) {
LOGGER.error("No topic in this broker, client: {} topic: {}",
ctx.channel().remoteAddress(), requestHeader.getTopic());
//be care of the response code, should set "not-exist" explicitly
response.setCode(ResponseCode.TOPIC_NOT_EXIST);
response.setRemark("No topic in this broker. topic: " +
requestHeader.getTopic());
return response;
}
TopicConfigManager类selectTopicConfig方法获取数据是从本地缓存获取的:
protected TopicConfig getTopicConfig(String topicName) {
// protected ConcurrentMap<String, TopicConfig> topicConfigTable = new
ConcurrentHashMap<>(1024);
return this.topicConfigTable.get(topicName);
}
GitHub link:
https://github.com/apache/rocketmq/discussions/9831#discussioncomment-15019361
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]