Re: Re: New Consumer throws GroupCoordinatorNotAvailableException

2015-11-03 Thread Alexey Pirogov
Thanks for reply.

Maybe it will be useful, I've noticed that after I tried to use client 0.9
with server 0.8.2 my data got corrupted. I wasn't able to read data from
existing topics after I switched back to client 0.8.2.
Cleaning kafka's and zk's data folders and creating topic from scratch
solved issue.


Re: New Consumer throws GroupCoordinatorNotAvailableException

2015-11-01 Thread tao xiao
The new consumer only works with the broker in trunk now which will soon
become 0.9

On Sun, 1 Nov 2015 at 20:54 Alexey Pirogov  wrote:

> Hi, I'm facing an issue with New Consumer. I'm getting
> GroupCoordinatorNotAvailableException during "poll" method:
>   12:32:50,942 ERROR ConsumerCoordinator:362 - Auto offset commit failed.
>org.apache.kafka.common.errors.GroupCoordinatorNotAvailableException:
> The group coordinator is not available.
>
> Here is the code:
> 
> Properties consumerProps = new Properties();
> consumerProps.put("bootstrap.servers", "localhost:9092");
> consumerProps.put("group.id", "test");
> consumerProps.setProperty("key.deserializer",
> ByteArrayDeserializer.class.getName());
> consumerProps.setProperty("value.deserializer",
> ByteArrayDeserializer.class.getName());
>
> consumer = new KafkaConsumer<>(consumerProps);
> consumer.subscribe(Collections.singletonList("test-topic"));
> Iterator> recordIter =
> consumer.poll(1).iterator();
> 
>
> I've build kafka-clients.jar from master two days ago.
> I'm using local server kafka_2.10-0.8.2.1. Is this ok or should I build new
> server also?
> Local server works well with client 0.8.2.2 and old consumer.
>
> Thanks,
> Alexey
>