From ad130c5512b0e5c9fe98c1fab28cb33e2cc42373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 28 Dec 2020 17:28:56 +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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Kafka/Kafka.php b/Kafka/Kafka.php index c62697e1..05ff9641 100644 --- a/Kafka/Kafka.php +++ b/Kafka/Kafka.php @@ -126,6 +126,8 @@ class Kafka extends \Snowflake\Process\Process protected function handlerExecute($topic, $message) { try { + $topic = str_replace('-', '_', $topic); + $namespace = 'App\\Kafka\\' . ucfirst($topic) . 'Consumer'; if (!class_exists($namespace)) { return;