You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Shivam Sharma <28...@gmail.com> on 2018/04/08 18:23:36 UTC

Scaling up kafka consumer applications(kafka streams)

Hi,

Lets say I have one consumer group which subscribed to *4 topics* and
partitions for each topics are:-

   1. First topic => 4 partitions
   2. Second topic => 3 partitions
   3. Third topic => 2 partitions
   4. Fourth topic => 1 partitions

Total number of *partitions = 10*. So total how many applications I can run
simultaneously.

4 or 10?
​Thanks​

-- 
Shivam Sharma
Data Engineer @ Goibibo
Indian Institute Of Information Technology, Design and Manufacturing
Jabalpur
Mobile No- (+91) 8882114744
Email:- 28shivamsharma@gmail.com
LinkedIn:-*https://www.linkedin.com/in/28shivamsharma
<https://www.linkedin.com/in/28shivamsharma>*

Re: Scaling up kafka consumer applications(kafka streams)

Posted by "Matthias J. Sax" <ma...@confluent.io>.
You might need to pipe the data through a topic with 10 partitions using
an explicit call to `.through()`

-Matthias

On 4/11/18 12:48 AM, Shivam Sharma wrote:
> No I am not repartitioning data later. But I wanted to run 10 applications.
> Is there any way to do this?
> 
> On Mon, Apr 9, 2018 at 1:44 AM, Matthias J. Sax <ma...@confluent.io>
> wrote:
> 
>> It depend on the concrete program you write... Most likely it's 4, but
>> hard to say without more information.
>>
>> If you read all 4 topics as a single stream (i.e. pattern subscription)
>> it should be 4. If you repartitions data in your applications later, it
>> might be more thought.
>>
>>
>> -Matthias
>>
>>
>> On 4/8/18 11:23 AM, Shivam Sharma wrote:
>>> Hi,
>>>
>>> Lets say I have one consumer group which subscribed to *4 topics* and
>>> partitions for each topics are:-
>>>
>>>    1. First topic => 4 partitions
>>>    2. Second topic => 3 partitions
>>>    3. Third topic => 2 partitions
>>>    4. Fourth topic => 1 partitions
>>>
>>> Total number of *partitions = 10*. So total how many applications I can
>> run
>>> simultaneously.
>>>
>>> 4 or 10?
>>> ​Thanks​
>>>
>>
>>
> 
> 


Re: Scaling up kafka consumer applications(kafka streams)

Posted by Shivam Sharma <28...@gmail.com>.
No I am not repartitioning data later. But I wanted to run 10 applications.
Is there any way to do this?

On Mon, Apr 9, 2018 at 1:44 AM, Matthias J. Sax <ma...@confluent.io>
wrote:

> It depend on the concrete program you write... Most likely it's 4, but
> hard to say without more information.
>
> If you read all 4 topics as a single stream (i.e. pattern subscription)
> it should be 4. If you repartitions data in your applications later, it
> might be more thought.
>
>
> -Matthias
>
>
> On 4/8/18 11:23 AM, Shivam Sharma wrote:
> > Hi,
> >
> > Lets say I have one consumer group which subscribed to *4 topics* and
> > partitions for each topics are:-
> >
> >    1. First topic => 4 partitions
> >    2. Second topic => 3 partitions
> >    3. Third topic => 2 partitions
> >    4. Fourth topic => 1 partitions
> >
> > Total number of *partitions = 10*. So total how many applications I can
> run
> > simultaneously.
> >
> > 4 or 10?
> > ​Thanks​
> >
>
>


-- 
Shivam Sharma
Data Engineer @ Goibibo
Indian Institute Of Information Technology, Design and Manufacturing
Jabalpur
Mobile No- (+91) 8882114744
Email:- 28shivamsharma@gmail.com
LinkedIn:-*https://www.linkedin.com/in/28shivamsharma
<https://www.linkedin.com/in/28shivamsharma>*

Re: Scaling up kafka consumer applications(kafka streams)

Posted by "Matthias J. Sax" <ma...@confluent.io>.
It depend on the concrete program you write... Most likely it's 4, but
hard to say without more information.

If you read all 4 topics as a single stream (i.e. pattern subscription)
it should be 4. If you repartitions data in your applications later, it
might be more thought.


-Matthias


On 4/8/18 11:23 AM, Shivam Sharma wrote:
> Hi,
> 
> Lets say I have one consumer group which subscribed to *4 topics* and
> partitions for each topics are:-
> 
>    1. First topic => 4 partitions
>    2. Second topic => 3 partitions
>    3. Third topic => 2 partitions
>    4. Fourth topic => 1 partitions
> 
> Total number of *partitions = 10*. So total how many applications I can run
> simultaneously.
> 
> 4 or 10?
> ​Thanks​
>