| 1 | <?php |
||
| 2 | |||
| 3 | namespace Freyo\LaravelQueueCMQ\Queue\Driver; |
||
| 4 | |||
| 5 | class TopicMeta |
||
| 6 | { |
||
| 7 | // default maxMsgSize 65536 |
||
| 8 | // default msgRetentionSeconds 86400, one day |
||
| 9 | |||
| 10 | /* 主题属性 |
||
| 11 | @note: 可修改 |
||
| 12 | :: maxMsgSize 消息最大值 |
||
| 13 | |||
| 14 | @note: 不可修改 |
||
| 15 | :: msgRetentionSeconds 消息最长保存时间,默认为 一天 |
||
| 16 | :: createTime 创建时间 |
||
| 17 | :: lastModifyTime 上次修改时间 |
||
| 18 | */ |
||
| 19 | public $maxMsgSize; |
||
| 20 | public $msgRetentionSeconds; |
||
| 21 | public $createTime; |
||
| 22 | public $lastModifyTime; |
||
| 23 | |||
| 24 | public function __construct() |
||
| 25 | { |
||
| 26 | $this->maxMsgSize = 65536; |
||
| 27 | $this->msgRetentionSeconds = 86400; |
||
| 28 | $this->createTime = 0; |
||
| 29 | $this->lastModifyTime = 0; |
||
| 30 | $this->filterType = 1; |
||
|
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
| 31 | } |
||
| 32 | |||
| 33 | public function __toString() |
||
| 34 | { |
||
| 35 | $info = [ |
||
| 36 | 'maxMsgSize' => $this->maxMsgSize, |
||
| 37 | 'msgRetentionSeconds' => $this->msgRetentionSeconds, |
||
| 38 | 'createTime' => $this->createTime, |
||
| 39 | 'lastModifyTime' => $this->lastModifyTime, |
||
| 40 | 'filterType' => $this->filterType, |
||
| 41 | ]; |
||
| 42 | |||
| 43 | return json_encode($info); |
||
| 44 | } |
||
| 45 | } |
||
| 46 |