getAssignment

Description

public function getAssignment(): array {}

Returns the current partition assignment

Example

$conf = SimpleKafkaClient\Configuration();
$conf->set('metadata.broker.list', 'kafka:9092');
$consumer = new SimpleKafkaClient\Consumer($conf);
$consumer->assign(
    [
        new SimpleKafkaClient\TopicPartition('test-topic', 1, 3000),
        new SimpleKafkaClient\TopicPartition('test-topic', 2, 3009)
    ]
);
var_dump($consumer->getAssignment());