新增im消息回调修改

This commit is contained in:
2023-11-27 13:17:39 +08:00
parent 6c3d364a6f
commit f57f1905a8
4 changed files with 458 additions and 96 deletions
@@ -0,0 +1,30 @@
<?php
declare(strict_types=1);
namespace App\Amqp\Producer;
use Hyperf\Amqp\Annotation\Producer;
use Hyperf\Amqp\Message\ProducerDelayedMessageTrait;
use Hyperf\Amqp\Message\ProducerMessage;
use Hyperf\Amqp\Message\Type;
/**
* 用户im下线处理
*/
#[Producer]
class UserImOffDelayDirectProducer extends ProducerMessage
{
use ProducerDelayedMessageTrait;
protected string $exchange = 'amqp.delay.direct';
protected string $type = Type::DIRECT;
protected string|array $routingKey = 'UserImOff';
public function __construct($data)
{
$this->payload = $data;
}
}