This commit is contained in:
2020-12-28 17:31:51 +08:00
parent 191f822cef
commit 3992be5afb
+3
View File
@@ -62,6 +62,9 @@ class Kafka extends \Snowflake\Process\Process
[$config, $topic, $conf] = $this->kafkaConfig($kafkaServer);
$objRdKafka = new Consumer($config);
$topic = $objRdKafka->newTopic($kafkaServer['topic'], $topic);
var_dump($kafkaServer['topic']);
$topic->consumeStart(0, RD_KAFKA_OFFSET_STORED);
while (true) {
$this->resolve($topic, $conf['interval'] ?? 1000);