xutl/qcloud-cmq

腾讯云CMQ PHP SDK

1.0.6 2021-02-15 05:42 UTC

This package is auto-updated.

Last update: 2024-09-15 13:30:10 UTC


README

此SDK与阿里云的MNS通用,可直接切换,支持同步异步模式。

Build Status License Latest Stable Version Total Downloads

安装

推荐通过 Composer 安装此扩展。

运行

php composer.phar require --prefer-dist xutl/qcloud-cmq

或在您的 composer.json 文件的 require 部分添加

"xutl/qcloud-cmq": "~1.0"

使用

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());
}

对于 Laravel

xutl/laravel-qcloud-cmq-queue