(No version information available, might only be in Git)
RdKafka\KafkaConsumer::newTopic — Create a new topic instance
$topic_name
[, RdKafka\TopicConf $topic_conf
= NULL
] )
Creates a new topic instance for topic_name
.
topic_name
Topic name
topic_conf
Optional configuration that will be used instead of the default topic configuration.
Note:
Creating two topic instances for the same topic name with different configurations has no effect. Every topic instance will use the configuration of the first instance.
Returns a RdKafka\ConsumerTopic.
Example #1 RdKafka\KafkaConsumer::newTopic() example
<?php
$conf = new RdKafka\TopicConf();
$conf->set("...", "...");
$topic = $kafka->newTopic("myTopic", $conf);
?>