改名
This commit is contained in:
+1
-1
@@ -101,7 +101,7 @@ class Producer extends Component
|
|||||||
$this->error(sprintf("Kafka error: %s (reason: %s)", rd_kafka_err2str($err), $reason));
|
$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 = $rk->newTopic($this->_topic, $this->topicConf);
|
||||||
$topic->produce(RD_KAFKA_PARTITION_UA, 0, $message, $key);
|
$topic->produce(RD_KAFKA_PARTITION_UA, 0, $message, $key);
|
||||||
$rk->poll($timeout);
|
$rk->poll($timeout);
|
||||||
|
|||||||
Reference in New Issue
Block a user