我想使用ConsumerGroupCommand.main(new String[]{"--bootstrap-server","xxx:9092","--group","consumer3","--describe"});
来获取偏移量度量,但方法的响应类型为void。只是控制台打印msg
如:
GROUP TOPIC PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG OWNER
consumer3 ttest 1 5522143 5522143 0 localhost java2_/ip
consumer3 ttest 0 5392302 5392302 0 localhost java new_/ip
我如何以string
收到回复?