isReachedOffsets
public static <K,V> boolean isReachedOffsets(org.apache.kafka.clients.consumer.Consumer<K,V> consumer,
Map<org.apache.kafka.common.TopicPartition,Long> targetOffsets)
Tests whether the Kafka consumer reached the target offsets for all specified topic partitions.
- Type Parameters:
K
- Key type.
V
- Value type.
- Parameters:
consumer
- Kafka consumer. It is expected to have some assignment to topic partitions.
targetOffsets
- Target offsets for topic partitions.
- Returns:
true
if the consumer has reached the target offsets for all specified topic
partitions.