Compare commits

...

4 Commits

Author SHA1 Message Date
ff5d7f4e3c 支持消息id 2023-08-17 14:24:46 +08:00
4e8a6473ad Merge branch 'master' of http://tianmagitlab.tianmagroup.com/xls/vendor/rocketmq 2023-08-03 09:54:10 +08:00
周阳阳
d5582b0d26 Merge branch 'zhouyangyang-master-patch-52289' into 'master'
Update README.md

See merge request xls/vendor/rocketmq!1
2023-07-12 11:51:05 +08:00
周阳阳
8499ffd7be Update README.md 2023-07-12 11:50:55 +08:00
3 changed files with 20 additions and 2 deletions

View File

@ -19,7 +19,7 @@
```shell
composer require tm_xls/rocket-mq-client-thinkphp
```
> 安装过程中需要允许`tm_xls/composer-thinkphp-installer`插件运行以便自动生成配置文件
### 配置
```php

View File

@ -18,6 +18,7 @@ class Consumer
$this->message->setMessageBody($data['messageBody'] ?? '');
$this->message->setTopic($data['topic'] ?? '');
$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
{
private $messageId;
private $messageBody;
private $tag;
@ -57,4 +58,20 @@ class Message
{
$this->topic = $topic;
}
/**
* @return mixed
*/
public function getMessageId()
{
return $this->messageId;
}
/**
* @param string $messageId
*/
public function setMessageId(string $messageId): void
{
$this->messageId = $messageId;
}
}