kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias J. Sax" <matth...@confluent.io>
Subject Re: how to listen each partition with separate threads ?
Date Fri, 31 Mar 2017 07:18:16 GMT
You need to create a KafkaConsumer per thread.

-Matthias

On 3/30/17 10:51 PM, Laxmi Narayan wrote:
> Hi ,
> 
> I was thinking to listen each partition with separate thread in Kafka.
> But i get error saying :
> 
> 
> 
> 
> *org.apache.kafka.clients.consumer.KafkaConsumer@383ad023KafkaConsumer is
> not safe for multi-threaded accessSubscription to topics, partitions and
> pattern are mutually exclusive.*​
> 
>  Is there any way to achieve this ?
> 
> 
> *​​*
> Keep learning keep moving .....
> 


Mime
View raw message