This commit is contained in:
2021-08-05 17:02:12 +08:00
parent 6d4b352c30
commit f0eb29fbd5
3 changed files with 10 additions and 7 deletions
+1 -2
View File
@@ -35,13 +35,12 @@ use Snowflake\Snowflake;
*/
public function execute(mixed $class, mixed $method = null): bool
{
var_dump(class_implements($class));
if (!($class instanceof ConsumerInterface)) {
return false;
}
/** @var KafkaProvider $container */
$container = Snowflake::app()->get('kafka-container');
$container = Snowflake::getDi()->get(KafkaProvider::class);
$container->addConsumer($this->topic, $class);
return true;