rocket-mq-client-thinkphp/example/Consumer.php
2023-07-09 18:12:14 +08:00

29 lines
494 B
PHP

<?php
namespace example;
use tm\xls\rocketMq\thinkphp\consumer\contract\ListenerInterface;
use tm\xls\rocketMq\thinkphp\consumer\message\Message;
class Consumer implements ListenerInterface
{
private $message;
public function __construct(Message $message)
{
$this->message = $message;
}
public function handle()
{
//处理订阅逻辑
}
public function enable(): bool
{
// 这边判断是否执行
return true;
}
}