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:
# Consumer timeout when the Kafka consumer group mechanism is used. When the broker does not receive a heartbeat from the consumer within this time, the consumer is considered to have failed, and the broker restarts the rebalance process. Currently, this value must be set in the broker, with group.min.session.timeout.ms set to 6000 and group.max.session.timeout.ms set to 300000.session.timeout.ms=10000# Interval at which consumers send heartbeats when the Kafka consumer group mechanism is used. This value must be less than session.timeout.ms, typically less than one-third of that value.heartbeat.interval.ms=3000# Maximum interval allowed between successive poll calls when the Kafka consumer group mechanism is used. If the poll is not called again within this period, the consumer is considered to have failed, and the broker will restart the rebalance process to assign its partitions to other consumers.max.poll.interval.ms=300000
Feedback