From c82e90ae87d08744945a666af84b1a7e936c0fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 24 Feb 2021 14:11:32 +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/Kafka.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Kafka/Kafka.php b/Kafka/Kafka.php index bfaffe28..8d5f004c 100644 --- a/Kafka/Kafka.php +++ b/Kafka/Kafka.php @@ -111,14 +111,11 @@ class Kafka extends \Snowflake\Process\Process if (!class_exists($namespace)) { return; } - $class = objectPool($namespace); + $class = Snowflake::createObject($namespace); if (!($class instanceof ConsumerInterface)) { return; } - $class->onHandler($Struct = objectPool(Struct::class, [$topic, $message])); - - objectRecover($namespace, $class); - objectRecover(Struct::class, $Struct); + $class->onHandler(Snowflake::createObject(Struct::class, [$topic, $message])); } catch (Throwable $exception) { $this->application->error($exception); }