Fetching offset timestamp with new KafkaConsumer

2015-11-30 Thread Wang, Howard
Hi, I use the new KafkaConsumer from just released Kafka (kafka-clients) 0.9.0.0 to manually commit offsets (consumer.commitAsync()). I have a use case where I want to know the meta data related to the offset such as the timestamp of the last offset. In Kafka 0.8.* java API, there is an offse

Re: Is 0.9 new consumer API compatible with 0.8.x.x broker

2015-11-30 Thread Wang, Howard
Thanks. I just found the new KafkaConsumer does have two API functions assignment() and committed(TopicPartition partition). With these 2 functions, we¹ll be able to retrieve the timestamp of last offset regardless whether offset storage is using ZK or offset topic. Howard -- Howard Wang Eng

Kafka 0.9 Consumer Group

2016-01-11 Thread Wang, Howard
Hi, I have a question regarding the Kafka 0.9 Consumer Group . I manually commit offsets using the Kafka 0.9 Consumer created with a consumer group. However, after my app restarted totally from scratch, the consumer group seems to lose all the offsets. Is that true that the consumer offsets ar

Re: Kafka 0.9 Consumer Group

2016-01-11 Thread Wang, Howard
e a little more detail on >>how >> you're verifying that offsets were lost. >> >> -Jason >> >> On Mon, Jan 11, 2016 at 7:42 AM, Wang, Howard >> wrote: >> >>> Hi, >>> >>> I have a question regarding the Kafka 0.9 Cons

Listener for Lead broker change for topic partition in the 0.9.* consumer

2016-04-01 Thread Wang, Howard
Hi, I have a use case where I need to be notified about the change of lead broker for my topic partitions. I’m using the new API 0.9.0. Is there any way of doing this in 0.9* API? Thanks. Howard

Using KafkaConsumer to consume the internal office __consumer_offsets in Kafka 10, using Java

2017-02-01 Thread Wang, Howard
Hi, I have a use case where I need to programmatically consume the internal office __consumer_offsets in Kafka 10 for data recovery. I am able to use the console consumer to consume the internal topic. But I wonder if I can use KafkaConsumer class from my Java program to do the same thing. A