lizhimins commented on code in PR #5590:
URL: https://github.com/apache/rocketmq/pull/5590#discussion_r1041843256
##########
broker/src/main/java/org/apache/rocketmq/broker/client/ConsumerManager.java:
##########
@@ -38,21 +40,28 @@
public class ConsumerManager {
private static final Logger LOGGER =
LoggerFactory.getLogger(LoggerName.BROKER_LOGGER_NAME);
- private static final long CHANNEL_EXPIRED_TIMEOUT = 1000 * 120;
private final ConcurrentMap<String, ConsumerGroupInfo> consumerTable =
new ConcurrentHashMap<>(1024);
+ private final ConcurrentMap<String, ConsumerGroupInfo>
consumerCompensationTable =
+ new ConcurrentHashMap<>(1024);
private final List<ConsumerIdsChangeListener>
consumerIdsChangeListenerList = new CopyOnWriteArrayList<>();
protected final BrokerStatsManager brokerStatsManager;
+ private final long channelExpiredTimeout;
+ private final long subscriptionExpiredTimeout;
- public ConsumerManager(final ConsumerIdsChangeListener
consumerIdsChangeListener) {
+ public ConsumerManager(final ConsumerIdsChangeListener
consumerIdsChangeListener, long expiredTimeout) {
Review Comment:
看了下这里是 proxy 在构造这个 ConsumerManager,保持这两个构造函数参数列表的相似性也挺重要的
##########
broker/src/main/java/org/apache/rocketmq/broker/processor/PullMessageProcessor.java:
##########
@@ -369,13 +370,26 @@ private RemotingCommand processRequest(final Channel
channel, RemotingCommand re
return response;
}
+ ConsumerManager consumerManager =
brokerController.getConsumerManager();
+ if (requestHeader.getRequestSource() != null) {
Review Comment:
how about use switch case
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]