Files
kiri-core/Kafka/Message.php
T

38 lines
578 B
PHP
Raw Normal View History

2021-08-05 16:47:59 +08:00
<?php
namespace Kafka;
use Server\SInterface\PipeMessage;
2021-08-05 17:02:12 +08:00
use Snowflake\Exception\NotFindClassException;
use Snowflake\Snowflake;
2021-08-05 16:47:59 +08:00
/**
*
*/
2021-08-05 17:02:12 +08:00
class Message implements PipeMessage
2021-08-05 16:47:59 +08:00
{
/**
* @param Struct $struct
*/
public function __construct(public Struct $struct)
{
}
/**
2021-08-05 17:02:12 +08:00
* @throws \ReflectionException
* @throws NotFindClassException
2021-08-05 16:47:59 +08:00
*/
public function process(): void
{
2021-08-05 17:02:12 +08:00
/** @var KafkaProvider $container */
$container = Snowflake::getDi()->get(KafkaProvider::class);
$data = $container->getConsumer($this->struct->topic);
var_dump($data);
2021-08-05 16:47:59 +08:00
}
}