Can you please send around the entire consumer log that leads to
ConsumerRebalanceFailedException ? That exception means the consumer
will not be able to startup. There can be several problems that can
lead to this exception, most commonly includes inability to connect to
zookeeper.

Thanks,
Neha

On Thu, Nov 22, 2012 at 9:04 AM, sun liwei <slivey...@gmail.com> wrote:
> Hi, all
>
> The code is like this:
>
>          ConsumerConnector consumer = ...;
>          Map<String, Integer> topicCountMap = ...;
>          Map<String, List<KafkaStream<Message>>>  consumerMap = null;
>          KafkaStream<Message> stream = null;
>
>          try{
>                 topicCountMap.put(topic, new Integer(1));
> consumerMap = consumer.createMessageStreams(topicCountMap);
> stream = consumerMap.get(topic).get(0);
>          }catch(Exception e){
>
>          }finally{
>                 *// shall I shutdown the consumer here? or should I call *
>                 //consumer.shutdown();
>                 //consumer = null;
>          }
>
> Actually the exception is: *kafka.common.ConsumerRebalanceFailedException:
> ***-1353254404267-5541f750 can't rebalance after 4 retries*
>
> Thank you very much!
>
> Adam

Reply via email to