These are chat archives for arnaud-lb/php-rdkafka

8th
Jul 2016
ahuigo
@ahuigo
Jul 08 2016 09:47

Is where any way to get the number of partitions of a specified topic?

$topic =  $kafkaConsumer->newTopic($topicName, $topicConf);
$partitions_num = $topic->getPartitionsNum();// any way??
for($i=0; $i<$partitions_num, $i++){
  $topic->consumeStart($i, RD_KAFKA_OFFSET_BEGINNING);

}

@edenhill

Magnus Edenhill
@edenhill
Jul 08 2016 11:23
Use the metadata api
ahuigo
@ahuigo
Jul 08 2016 11:25
Thanks, I'll have a try.