tsunghanjacktsai commented on code in PR #4488:
URL: https://github.com/apache/rocketmq/pull/4488#discussion_r902108319
##########
tools/src/main/java/org/apache/rocketmq/tools/admin/DefaultMQAdminExtImpl.java:
##########
@@ -320,8 +321,18 @@ public ConsumeStats examineConsumeStats(String
consumerGroup,
}
if (result.getOffsetTable().isEmpty()) {
- throw new MQClientException(ResponseCode.CONSUMER_NOT_ONLINE,
- "Not found the consumer group consume stats, because return
offset table is empty, maybe the consumer not consume any message");
+ ConsumerConnection connection;
+ try {
+ connection = this.examineConsumerConnectionInfo(consumerGroup);
+ } catch (Exception e) {
+ throw new MQClientException(ResponseCode.CONSUMER_NOT_ONLINE,
+ "Not found the consumer group consume stats, because
return offset table is empty, maybe the consumer not online");
+ }
+
+ if
(connection.getMessageModel().equals(MessageModel.BROADCASTING)) {
+ throw new MQClientException(ResponseCode.CONSUME_BROADCASTING,
+ "Not found the consumer group consume stats, because
return offset table is empty, the consumer using in broadcast model");
Review Comment:
Hi @zhangjidi2016 ,
Thx for your contribution.
Please rephrase the "the consumer using in broadcast model" into "the
consumer is under the broadcast mode". A good exception message would make us
more perfect :-)
##########
common/src/main/java/org/apache/rocketmq/common/protocol/ResponseCode.java:
##########
@@ -80,4 +80,6 @@ public class ResponseCode extends RemotingSysResponseCode {
public static final int UPDATE_GLOBAL_WHITE_ADDRS_CONFIG_FAILED = 211;
+ public static final int CONSUME_BROADCASTING = 212;
Review Comment:
Would prefer "BROADCAST_CONSUMPTION".
--
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]