1. Background
Constructed a Kafka consumer group, and then mainly wanted to get the start offset and end offset of the partition of Kafka, but when it was obtained, it got stuck here and under some circumstances.
The procedure is as follows
private Map<TopicPartition, Long> getEdnOffsets(KafkaConsumer<String, String> consumer, Collection<