NotCoordinatorForConsumerException is for consumer side. I think if you
are using simpleConsumer, then you have to do your own offset management.

TopicMetadata tells you whether there is a leader for the topic partitions,
replicas, ISR.

Thanks,

Mayuresh

On Wed, Oct 28, 2015 at 8:23 AM, David Corbin <dcor...@lancope.com> wrote:

> I'm working on a project that I hope to use the SimpleConsumer on.  I'm
> trying to write some test code around our code that is wrapping the
> SimpleConsumer.
>
> The environment is 1 kafka broker, and 1 zookeeper
> The test goes like this:
>
> Create a topic ("foo", 1 partition, 1 replica)
> Create a Producer, and send a message
> Create a SimpleConsumer, and try to read the offset
>
> Failure with: NotCoordinatorForConsumerException
>
> If I continue to require for an extended period, I continue to get that
> exception.
>
> As near as I can tell, the topic metadata says there is a leader, but the
> the broker thinks it's being rebalanced.
> I've done the above test immediately after stop, clean out old data, and
> restart both zookeeper and kafka.
>
> Suggestions welcome.
>
>


-- 
-Regards,
Mayuresh R. Gharat
(862) 250-7125

Reply via email to