You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Rakesh Reddy Donti Reddy <ra...@koffeemedia.com> on 2019/11/16 14:36:50 UTC

doubt in kafka

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

Re: doubt in kafka

Posted by John Roesler <jr...@fastmail.com>.
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
> 

Re: doubt in kafka

Posted by Shreesha Hebbar <sh...@gmail.com>.
But then again one can manually assign partitions if required.

On Sun, 17 Nov 2019, 9:35 am Boyang Chen, <bc...@outlook.com> wrote:

> Hey Rajesh,
>
> Consumer has a self managed assign mode to read from the topic you choose.
>
> Boyang
>
> Get Outlook for iOS<https://aka.ms/o0ukef>
> ________________________________
> From: Rakesh Reddy Donti Reddy <ra...@koffeemedia.com>
> Sent: Saturday, November 16, 2019 10:36:50 PM
> To: dev@kafka.apache.org <de...@kafka.apache.org>
> Subject: doubt in kafka
>
> 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
>

Re: doubt in kafka

Posted by Boyang Chen <bc...@outlook.com>.
Hey Rajesh,

Consumer has a self managed assign mode to read from the topic you choose.

Boyang

Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Rakesh Reddy Donti Reddy <ra...@koffeemedia.com>
Sent: Saturday, November 16, 2019 10:36:50 PM
To: dev@kafka.apache.org <de...@kafka.apache.org>
Subject: doubt in kafka

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