getSubscription

Description

public function getSubscription(): array {}

Return topic names to which the consumer is currently subscribed to

Example

$conf = SimpleKafkaClient\Configuration();
$conf->set('metadata.broker.list', 'kafka:9092');
$consumer = new SimpleKafkaClient\Consumer($conf);
$consumer->subscribe(['test-topic']);
var_dump($consumer->getSubscription());