onejimmyboy commented on PR #7257: URL: https://github.com/apache/rocketmq/pull/7257#issuecomment-1698595593
> It seems that it is not appropriate to create retry topic in PopMessageProcessor. > > For the background, the retry topic will be created when heartbeat request is sent to broker for the remoting protocol client. > > https://github.com/apache/rocketmq/blob/b3acee77d0a76fffba808d7b303b15fec7eb700f/broker/src/main/java/org/apache/rocketmq/broker/processor/ClientManageProcessor.java#L183-L185 > > But for the gRPC Local mode, it will not invoke createTopicInSendMessageBackMethod so that the retry topic will not be created. > > https://github.com/apache/rocketmq/blob/b3acee77d0a76fffba808d7b303b15fec7eb700f/proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/client/ClientActivity.java#L109-L114 > > Maybe it's better to handle creating retry topic behavior in heartbeat while taking cluster mode into consideration. The reason for adding the creation of a retry queue in PopMessageProcessor is that this method automatically creates consumer groups, so this PR is to automatically create a retry queue after the consumer group is automatically created ` SubscriptionGroupConfig subscriptionGroupConfig = this.brokerController.getSubscriptionGroupManager().findSubscriptionGroupConfig(requestHeader.getConsumerGroup()); //自动创建consumerGroups if (null == subscriptionGroupConfig) { response.setCode(ResponseCode.SUBSCRIPTION_GROUP_NOT_EXIST); response.setRemark(String.format("subscription group [%s] does not exist, %s", requestHeader.getConsumerGroup(), FAQUrl.suggestTodo(FAQUrl.SUBSCRIPTION_GROUP_NOT_EXIST))); return response; } String retryTopicName = MixAll.getRetryTopic(requestHeader.getConsumerGroup()); this.brokerController.getTopicConfigManager().createTopicInSendMessageBackMethod(retryTopicName, subscriptionGroupConfig.getRetryQueueNums(), PermName.PERM_WRITE | PermName.PERM_READ, requestHeader.isOrder(), requestHeader.getInitMode()); ` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@rocketmq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org