支持消息id

This commit is contained in:
zyimm 2023-08-17 14:24:46 +08:00
parent 4e8a6473ad
commit ff5d7f4e3c
2 changed files with 18 additions and 0 deletions

View File

@ -18,6 +18,7 @@ class Consumer
$this->message->setMessageBody($data['messageBody'] ?? ''); $this->message->setMessageBody($data['messageBody'] ?? '');
$this->message->setTopic($data['topic'] ?? ''); $this->message->setTopic($data['topic'] ?? '');
$this->message->setTag($data['tag'] ?? ''); $this->message->setTag($data['tag'] ?? '');
$this->message->setMessageId($data['messageId'] ?? '');
} }

View File

@ -4,6 +4,7 @@ namespace tm\xls\rocketMq\thinkphp\consumer\message;
class Message class Message
{ {
private $messageId;
private $messageBody; private $messageBody;
private $tag; private $tag;
@ -57,4 +58,20 @@ class Message
{ {
$this->topic = $topic; $this->topic = $topic;
} }
/**
* @return mixed
*/
public function getMessageId()
{
return $this->messageId;
}
/**
* @param string $messageId
*/
public function setMessageId(string $messageId): void
{
$this->messageId = $messageId;
}
} }