\MsgDemo

Class MsgDemo

Summary

Methods
Properties
Constants
getTokenGetter()
receiveMsg()
$tokenGetter
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

Methods

getTokenGetter()

getTokenGetter() 

receiveMsg()

receiveMsg(string  $messageType, string  $queueName, callable  $callback) 

获取消息

Parameters

string $messageType

消息类型

string $queueName

在云通信页面开通相应业务消息后,就能在页面上获得对应的queueName
(e.g. Alicom-Queue-xxxxxx-xxxxxReport)

callable $callback

回调仅接受一个消息参数;
回调返回true,则工具类自动删除已拉取的消息;
回调返回false,消息不删除可以下次获取.
(e.g. function ($message) { return true; }