getReplicas

Description

public function getReplicas(): Collection {}

Topic partition replicas reported by broker

Example

$conf = new SimpleKafkaClient\Configuration();
$conf->set('auto.offset.reset', 'earliest');
$producer = new SimpleKafkaClient\Producer($conf);
$metadata = $producer->getMetadata(false, 10000);
$replicas = $metadata->getTopics()->current()->getPartitions()->current()->getReplicas();
while ($replicas->valid()) {
    echo sprintf('Insync Replicas id: %d', $replicas->current()) . PHP_EOL;
    $replicas->next();
}