[ISSUE #6213] fix: when subscriptionGroupConfig is null ,we do not register consumer

This commit is contained in:
Lei Zhiyuan
2023-03-08 16:06:28 +08:00
committed by GitHub
parent 98d8988abc
commit 61c4ba5009
@@ -115,21 +115,21 @@ public class ClientManageProcessor implements NettyRequestProcessor {
subscriptionGroupConfig.getRetryQueueNums(),
PermName.PERM_WRITE | PermName.PERM_READ, hasOrderTopicSub, topicSysFlag);
}
boolean changed = this.brokerController.getConsumerManager().registerConsumer(
consumerData.getGroupName(),
clientChannelInfo,
consumerData.getConsumeType(),
consumerData.getMessageModel(),
consumerData.getConsumeFromWhere(),
consumerData.getSubscriptionDataSet(),
isNotifyConsumerIdsChangedEnable
);
if (changed) {
LOGGER.info(
"ClientManageProcessor: registerConsumer info changed, SDK address={}, consumerData={}",
RemotingHelper.parseChannelRemoteAddr(ctx.channel()), consumerData.toString());
if (null != subscriptionGroupConfig) {
boolean changed = this.brokerController.getConsumerManager().registerConsumer(
consumerData.getGroupName(),
clientChannelInfo,
consumerData.getConsumeType(),
consumerData.getMessageModel(),
consumerData.getConsumeFromWhere(),
consumerData.getSubscriptionDataSet(),
isNotifyConsumerIdsChangedEnable
);
if (changed) {
LOGGER.info(
"ClientManageProcessor: registerConsumer info changed, SDK address={}, consumerData={}",
RemotingHelper.parseChannelRemoteAddr(ctx.channel()), consumerData.toString());
}
}
}