Hi Mazen, We'll check if the exception returned from brokers is retriable exceptions, if yes, we'll keep retrying until request timeout(default 30 seconds). Some retriable exceptions like: NOT_COORDINATOR, COORDINATOR_NOT_AVAILABLE, LEADER_NOT_AVAILABLE,...
Thanks. Luke On Thu, Aug 5, 2021 at 4:11 PM Mazen Ezzeddine < mazen.ezzedd...@etu.univ-cotedazur.fr> wrote: > Hi all, > > I am using Kafka admin client to query consumer group partition offsets > (committed and latest) using the below code: > > > Map<TopicPartition, OffsetAndMetadata> offsets = > admin.listConsumerGroupOffsets(CONSUMER_GROUP) > .partitionsToOffsetAndMetadata().get(); > Map<TopicPartition, OffsetSpec> requestLatestOffsets = new HashMap<>(); > for(TopicPartition tp: offsets.keySet()) { > requestLatestOffsets.put(tp, OffsetSpec.latest()); > } > Map<TopicPartition, ListOffsetsResult.ListOffsetsResultInfo> latestOffsets > = > admin.listOffsets(requestLatestOffsets).all().get(); > > > During rebalance of the consumer group (e.g., say a consumer is joining > the group) does the admin API blocks until the rebalance completes? Or does > it just return whatever information on the consumer group members/offset is > present at the request time? I am sying some zero values for the offsets > (latest/committed), when I programmatically add a consumer and after few > seconds (3-4) query for the offsets. > > > Thank you. > >