Properties props = new Properties();props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrap);KafkaConsumer<String, String> consumer = new KafkaConsumer<>(props);consumer.subscribe(Arrays.asList(topic));while (true) {ConsumerRecords<String, String> records = consumer.poll(100);}

]$ bin/kafka-consumer-groups.sh --bootstrap-server 9.146.153.249:9092 --listCR
]$ bin/kafka-consumer-groups.sh --bootstrap-server 9.146.153.249:9092 --describe --group CRNote: This will not show information about old Zookeeper-based consumers.
]$ bin/kafka-console-consumer.sh --bootstrap-server 127.0.0.1:9092 --from-beginning --topic test --group test1
--describe command, as shown below:
# When using the Kafka consumer grouping mechanism, the consumer timeout period. When the Broker does not receive a heartbeat from the consumer within this time, the consumer is considered to have failed, and the Broker initiates the Rebalance process. Currently, this value must be set in the Broker configuration between group.min.session.timeout.ms=6000 and group.max.session.timeout.ms=300000.session.timeout.ms=10000# When using the Kafka consumer grouping mechanism, the interval for consumers to send heartbeat. This value must be less than session.timeout.ms, normally less than one-third of it.heartbeat.interval.ms=3000# When using the Kafka consumer grouping mechanism, the maximum interval for subsequent calls to poll. If poll is not called again within this time, the consumer is considered to have failed, and the Broker will initiate Rebalance again to assign its partitions to other consumers.max.poll.interval.ms=300000
Feedback