./kafka-consumer-groups.sh --bootstrap-server localhost:9081 --describe --group 
test


use describeConsumerGroups method ??


        private static void print() throws InterruptedException, 
ExecutionException {
                Properties props = new Properties();
                props.setProperty("bootstrap.servers",
                                
"192.168.1.100:9081,192.168.1.100:9082,192.168.1.100:9083,,192.168.1.100:9087,,192.168.1.100:9088");
                AdminClient client = KafkaAdminClient.create(props);
                DescribeConsumerGroupsResult describeConsumerGroups = 
client.describeConsumerGroups(Arrays.asList("test"));
                Map<String, KafkaFuture<ConsumerGroupDescription&gt;&gt; 
describedGroups = describeConsumerGroups.describedGroups();
                Iterator<String&gt; iterator = 
describedGroups.keySet().iterator();
                while (iterator.hasNext()) {
                        String key = iterator.next();
                        KafkaFuture<ConsumerGroupDescription&gt; value = 
describedGroups.get(key);
                        ConsumerGroupDescription consumerGroupDescription = 
value.get();
                        Collection<MemberDescription&gt; members = 
consumerGroupDescription.members();
                }


        }



but i can't find about any method about bottom column:
GROUP&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TOPIC&nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp;PARTITION&nbsp; CURRENT-OFFSET&nbsp; LOG-END-OFFSET&nbsp; 
LAG&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CONSUMER-ID&nbsp; &nbsp; 
&nbsp;HOST&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CLIENT-ID



By its three info :
PARTITION&nbsp; CURRENT-OFFSET&nbsp; LOG-END-OFFSET&nbsp;

Reply via email to