You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Gaurav Agarwal <ga...@gmail.com> on 2015/12/02 06:49:05 UTC

Re: ZookeeperConsumerConnector error

Hello
In the example that consumer.createMessageStreams(topiccount) is been
called in the run method and this consumer is a instance of
consumerconnector by the properties map
Complete Example is mentioned in the link
On Dec 2, 2015 10:57 AM, "Datta, Saurav" <sd...@paypal.com.invalid> wrote:

> Hello,
>
> I am getting the below error message:
>
>
> kafka.common.MessageStreamsExistException: ZookeeperConsumerConnector can
> create message streams at most once
>
> at
> kafka.javaapi.consumer.ZookeeperConsumerConnector.createMessageStreams(ZookeeperConsumerConnector.scala:79)
>
> at
> kafka.javaapi.consumer.ZookeeperConsumerConnector.createMessageStreams(ZookeeperConsumerConnector.scala:97)
>
> at
> com.paypal.risknrt.NRTConsumer.UDFcreateMessageStreams(NRTConsumer.java:91)
>
> at com.paypal.risknrt.AsyncCaller.run(AsyncCaller.java:160)
>
> at com.paypal.risknrt.AsyncCaller.main(AsyncCaller.java:378)
>
> The code snippet is :
>
> import kafka.consumer.KafkaStream;
>
> import kafka.javaapi.consumer.ConsumerConnector;
>
> …
>
> …
>
> ..
>
>
> Map<String, List<KafkaStream<byte[], byte[]>>> tempConsumerMap = null;
>
> tempConsumerMap = consumer.createMessageStreams(in_topicCountMap);
>
> This is on the lines of
> https://cwiki.apache.org/confluence/display/KAFKA/Consumer+Group+Example
>
> I am using version 0.8.2.1.
>
> While I understand the error message, I do not see any other piece of code
> in the project that is calling consumer.createMessageStreams. Any
> suggestions on how to handle this ?
>
>
> Regards,
> Saurav Datta
>
>