Your observation is correct. KafkaConsumer.position() is a blocking
call. It's a know issue that there is no configurable timeout value.

I am not aware of any workaround.


-Matthias

On 12/21/17 6:05 AM, sahil aggarwal wrote:
> Hi,
> 
> Facing issue where *kafka-consumer-groups.sh --describe * get stuck if one
> of the partition is unavailable i.e no leader. Going through some code
> found that it does following to get log end offset:
> 
> * Create consumer
> * For each partition
>    * assign partition
>    * seek to end
>    * get position
> 
> Issue is KafkaConsumer.posiiton() use Fetcher.retrieveOffsetsByTimes()
> internally which is called with timeout Long.MAX_VALUE and it gets stuck in
> loop there.
> 
> 
> Any pointers?
> 
> 
> *Version*: 0.10.0.1
> 
> 
> Thanks,
> Sahil
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to