This commit is contained in:
2020-10-28 16:14:40 +08:00
parent f1b9086466
commit 1197ce7c86
+1 -1
View File
@@ -101,7 +101,7 @@ class Producer extends Component
$this->error(sprintf("Kafka error: %s (reason: %s)", rd_kafka_err2str($err), $reason));
});
$rk = new \RdKafka\Producer();
$rk = new \RdKafka\Producer($this->conf);
$topic = $rk->newTopic($this->_topic, $this->topicConf);
$topic->produce(RD_KAFKA_PARTITION_UA, 0, $message, $key);
$rk->poll($timeout);