feat : order info

This commit is contained in:
2025-03-24 10:06:29 +08:00
parent 9860f3eab8
commit 3c91ac4077
4 changed files with 21 additions and 3 deletions

View File

@@ -4,6 +4,7 @@ declare(strict_types=1);
namespace App\Amqp\Consumer\Statement;
use Hyperf\Amqp\Message\Type;
use Hyperf\Amqp\Result;
use Hyperf\Amqp\Annotation\Consumer;
use Hyperf\Amqp\Message\ConsumerMessage;
@@ -12,6 +13,11 @@ use PhpAmqpLib\Message\AMQPMessage;
#[Consumer(exchange: 'hyperf', routingKey: 'hyperf', queue: 'hyperf', name: "DriverConsumer", nums: 1)]
class DriverConsumer extends ConsumerMessage
{
/**
* @var Type|string 消息类型
*/
protected Type|string $type = Type::DIRECT;
public function consumeMessage($data, AMQPMessage $message): Result
{
return Result::ACK;