Compare commits
4 Commits
a7da13c585
...
ff5d7f4e3c
Author | SHA1 | Date | |
---|---|---|---|
ff5d7f4e3c | |||
4e8a6473ad | |||
|
d5582b0d26 | ||
|
8499ffd7be |
|
@ -19,7 +19,7 @@
|
|||
```shell
|
||||
composer require tm_xls/rocket-mq-client-thinkphp
|
||||
```
|
||||
|
||||
> 安装过程中需要允许`tm_xls/composer-thinkphp-installer`插件运行以便自动生成配置文件
|
||||
|
||||
### 配置
|
||||
```php
|
||||
|
@ -95,4 +95,4 @@ class Consumer implements ListenerInterface
|
|||
}
|
||||
}
|
||||
|
||||
```
|
||||
```
|
||||
|
|
|
@ -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'] ?? '');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user