[ 
https://issues.apache.org/jira/browse/ROCKETMQ-204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16042539#comment-16042539
 ] 

ASF GitHub Bot commented on ROCKETMQ-204:
-----------------------------------------

Github user lizhanhui commented on a diff in the pull request:

    https://github.com/apache/incubator-rocketmq/pull/115#discussion_r120857815
  
    --- Diff: 
client/src/main/java/org/apache/rocketmq/client/impl/consumer/DefaultMQPullConsumerImpl.java
 ---
    @@ -324,11 +324,16 @@ public void persistConsumerOffset() {
     
         @Override
         public void updateTopicSubscribeInfo(String topic, Set<MessageQueue> 
info) {
    -        Map<String, SubscriptionData> subTable = 
this.rebalanceImpl.getSubscriptionInner();
    -        if (subTable != null) {
    -            if (subTable.containsKey(topic)) {
    -                this.rebalanceImpl.getTopicSubscribeInfoTable().put(topic, 
info);
    +        if (info != null) {
    +            Map<String, SubscriptionData> subTable = 
this.rebalanceImpl.getSubscriptionInner();
    +            if (subTable != null) {
    +                if (subTable.containsKey(topic)) {
    +                    
this.rebalanceImpl.getTopicSubscribeInfoTable().put(topic, info);
    +                }
                 }
    +        } else {
    +            Set<MessageQueue> prev = 
this.rebalanceImpl.getTopicSubscribeInfoTable().remove(topic);
    +            log.info("instanceName={}, group={}, topicSubscribeInfoTable 
of topic {} is remove, {}, prev = {}", defaultMQPullConsumer.getInstanceName(), 
defaultMQPullConsumer.getConsumerGroup(), topic, prev);
    --- End diff --
    
    is remove --> is removed


> when all brokers is offline, client still attempts to send heartbeat
> --------------------------------------------------------------------
>
>                 Key: ROCKETMQ-204
>                 URL: https://issues.apache.org/jira/browse/ROCKETMQ-204
>             Project: Apache RocketMQ
>          Issue Type: Bug
>          Components: rocketmq-broker, rocketmq-client
>            Reporter: Eason Chen
>            Assignee: Jaskey Lam
>
> all brokers were down but client still hold at least one broker adresss and 
> report heartbeat to it. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to