Hi Rakesh, generally, you don’t worry too much about the partitions, they’re mostly for processing parallelism. Instead, you use the topics themselves to route data where you want it to go.
but in case you really want a specific Consumer to handle a specific partition, you can use ‘assign’ and give to the TopicPartition you want. See https://kafka.apache.org/22/javadoc/org/apache/kafka/clients/consumer/KafkaConsumer.html#assign-java.util.Collection- I hope this helps! -John On Sat, Nov 16, 2019, at 8:36 AM, Rakesh Reddy Donti Reddy wrote: > hello, > I'm rakesh from hyderabad working in netindia pvt ltd. my company wants me > to work on kafka,i have a question on kafka > Q: If a producer has to send data to a some x partition in a topic , then > how can > i assign a consumer to read data from that particular x partition?? > > Thanking you in advance, > D.Rakesh Reddy >