How to properly configure topic reading with a dynamic number of partitions?

80 views
Skip to first unread message

Roman

unread,
May 7, 2017, 6:58:31 AM5/7/17
to php-rdkafka
I have one topic with a dynamic number of sections (for example: from 1 to 100). This implementation was chosen for a number of reasons. 
The number of users of the topic is also dynamic. So it is necessary for concurrency.
I read the documentation 
Unfortunately, I could not understand how to properly configure the topic reading. Is it necessary to do this?

<? php
$
Queue = $ rk-> newQueue ();
$
Topic1 = $ rk-> newTopic ("topic1");
$
Topic1-> consumeQueueStart (0, RD_KAFKA_OFFSET_BEGINNING, $ queue);
$
Topic1-> consumeQueueStart (1, RD_KAFKA_OFFSET_BEGINNING, $ queue);
...........
...........
...........
$
Topic1-> consumeQueueStart (100, RD_KAFKA_OFFSET_BEGINNING, $ queue);

Probably, I missed something. Please tell me how to achieve the correct solution of the problem?
Reply all
Reply to author
Forward
0 new messages