From 14c052a3b20a2fdc297fcc207fd8726bcf91f069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 28 Oct 2020 16:42:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Kafka/Producer.php | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/Kafka/Producer.php b/Kafka/Producer.php index 4b608003..cf1bc4c2 100644 --- a/Kafka/Producer.php +++ b/Kafka/Producer.php @@ -106,20 +106,6 @@ class Producer extends Component $topic = $rk->newTopic($this->_topic, $this->topicConf); $topic->produce(RD_KAFKA_PARTITION_UA, 0, $message, $key); $rk->poll($timeout); - - $event = Snowflake::app()->getEvent(); - $event->on(Event::EVENT_AFTER_REQUEST, [$this,'onFlush'], [$rk, $timeout]); - } - - - /** - * @param $rk - * @param $timeout - */ - public function onFlush($rk, $timeout) - { - var_dump($rk, $timeout); - $this->debug(Event::EVENT_AFTER_REQUEST); $rk->flush($timeout); } }