topic); } /** * @param mixed $class * @param mixed|null $method * @return bool * @throws Exception */ public function execute(mixed $class, mixed $method = null): bool { if (!($class instanceof ConsumerInterface)) { return false; } /** @var KafkaProvider $container */ $container = Snowflake::getDi()->get(KafkaProvider::class); $container->addConsumer($this->topic, $class); return true; } }