目的
希望获取到 rocketmq 中, 指定消费组中待消费的消息数量。
目前状态
可以通过以下方式获取到 topic 中每个 queue 的 maxOffset 和 minOffset ,但是无法获取到当前消费到的 offset
TopicStatsTable topicStatsTable = mqAdminExt.examineTopicStats(consumerProperties.getTopic()); topicStatsTable.getOffsetTable().values().stream() .map(topicOffset -> topicOffset.getMaxOffset()) // do something 