xutl / qcloud-cmq
Qcloud CMQ php sdk
Installs: 1 039
Dependents: 1
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- phpunit/phpunit: ~7.0
README
这个SDK和阿里云的MNS通用,直接可切换, 支持 同步 异步模式。
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist xutl/qcloud-cmq
or add
"xutl/qcloud-cmq": "~1.0"
to the require section of your composer.json
file.
Use
use XuTL\QCloud\Cmq\Client; $client = new Client('https://cmq-queue-bj.api.qcloud.com','abcdedgasdf','abcdedgasdf'); $request = new \XuTL\QCloud\Cmq\Requests\ListTopicRequest(); try { $response = $client->listTopic($request); print_r($response); } catch (Exception $e) { print_r($e->getMessage()); }