Skip to content

Commit e8f20f6

Browse files
committed
remove topic conf, deprecated
1 parent dec04ce commit e8f20f6

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

‎pkg/rdkafka/RdKafkaContext.php‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,20 +184,18 @@ public static function getLibrdKafkaVersion(): string
184184
private function getConf(): Conf
185185
{
186186
if (null === $this->conf) {
187-
$topicConf = new TopicConf();
187+
$this->conf = new Conf();
188188

189189
if (isset($this->config['topic']) && is_array($this->config['topic'])) {
190190
foreach ($this->config['topic'] as $key => $value) {
191-
$topicConf->set($key, $value);
191+
$this->conf->set($key, $value);
192192
}
193193
}
194194

195195
if (isset($this->config['partitioner'])) {
196-
$topicConf->setPartitioner($this->config['partitioner']);
196+
$this->conf->set('partitioner', $this->config['partitioner']);
197197
}
198198

199-
$this->conf = new Conf();
200-
201199
if (isset($this->config['global']) && is_array($this->config['global'])) {
202200
foreach ($this->config['global'] as $key => $value) {
203201
$this->conf->set($key, $value);
@@ -219,8 +217,6 @@ private function getConf(): Conf
219217
if (isset($this->config['stats_cb'])) {
220218
$this->conf->setStatsCb($this->config['stats_cb']);
221219
}
222-
223-
$this->conf->setDefaultTopicConf($topicConf);
224220
}
225221

226222
return $this->conf;

0 commit comments

Comments
 (0)