You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2018/04/25 08:58:37 UTC

[GitHub] suclogger commented on issue #296: Not found the consumer group consume stats, because return offset table is empty, maybe the consumer not consume any message

suclogger commented on issue #296: Not found the consumer group consume stats, because return offset table is empty, maybe the consumer not consume any message
URL: https://github.com/apache/rocketmq/issues/296#issuecomment-384214293
 
 
   I've been encountering the same problem while try to trace consume status of broadcast messages.
   As is shown in the source code `DefaultMQPushConsumerImpl`:
   
   ```java
   ...
   if (MessageModel.CLUSTERING == this.defaultMQPushConsumer.getMessageModel()) {
               commitOffsetValue = this.offsetStore.readOffset(pullRequest.getMessageQueue(), ReadOffsetType.READ_FROM_MEMORY);
               if (commitOffsetValue > 0) {
                   commitOffsetEnable = true;
               }
           }
   ...
           int sysFlag = PullSysFlag.buildSysFlag(
               commitOffsetEnable, // commitOffset
               true, // suspend
               subExpression != null, // subscription
               classFilter // class filter
           );
   ...
   ```
   When consumeMode is set to broadcast, commit log is not recorded and so not submit to the broker, so if you can't find consume status afterward.
   
   I assume that this is a design failure.
   
   Originally offset is recorded by consumer-group in broker, but under broadcast mode, every client within the same consumer-group has it's own offset. And that makes it impossible to record consume status for broadcast message.
   
   Would @vongosling explain the design and if it is planed to be fixed?
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services