PHPackages                             baocaixiong/aliyun-mqs-lib - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. baocaixiong/aliyun-mqs-lib

ActiveLibrary[HTTP &amp; Networking](/categories/http)

baocaixiong/aliyun-mqs-lib
==========================

aliyun mqs service php sdk

0.0.2(11y ago)95[2 issues](https://github.com/baocaixiong/aliyun-mqs-lib/issues)MITPHP

Since Feb 8Pushed 10y ago2 watchersCompare

[ Source](https://github.com/baocaixiong/aliyun-mqs-lib)[ Packagist](https://packagist.org/packages/baocaixiong/aliyun-mqs-lib)[ RSS](/packages/baocaixiong-aliyun-mqs-lib/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

aliyun-mqs-lib
--------------

[](#aliyun-mqs-lib)

阿里云MQS队列服务PHP非官方SDK。

官方已经更新MQS为MNS服务, 更好更快更强, 且发布了最新的官方sdk,地址为: [PHP SDK\_SDK使用手册\_消息服务-阿里云产品文档](https://help.aliyun.com/document_detail/mns/sdk/php-sdk.html)

安装
--

[](#安装)

使用composer安装

```
"baocaixiong/aliyun-mqs-lib": "dev-master"

```

使用
--

[](#使用)

暂时只针对`laravel4.2`版本，其他环境请自看phpunit测试。

1. 在app/config/queue.php中添加:

```
'mqs' => [
    'driver' => 'mqs',
    'queue' => '',
    'host' => '',
    'key' => '',
    'secret' => '',
    'keepalive' => 'receive message waitseconds',
]

```

将其中 `default` 键值改为 `mqs`

2. 添加provider, 在 `app/config/app.php`中, `providers`键中添加

```
   'Mqs\Laravel\MqsServiceProvider'

```

3. 使用`Cache::push('', ["x" => ""])` 推送队列数据到mqs

单独使用
----

[](#单独使用)

### 创建Queue

[](#创建queue)

```
$req = new \Mqs\Request\CreateQueue('queue-name');
$req->setDelaySeconds(x);
$req->setMaximumMessageSize(x);
// 如果参数已经组好了数组可以直接通过 $req->params($parameters) 设置属性;
$res = $req->send();
$res->isSuccess(); // => true

```

### 发送消息

[](#发送消息)

```
$req = new \Mqs\Request\SendMessage('queue-name');
$req->setMessageBody(xxx);
$req->setDelaySeconds(xxx);
$res = $req->send();
$res->isSuccess(); // => true 成功

```

### 接受消息

[](#接受消息)

```
$req = new \Mqs\Request\ReceiveMessage('queue-name');
$req->setWaitseconds(30);
$res = $req->send();
if ($res->isSuccess()) {
    $message = $res->getMessage(); // => \Mqs\Message
}
$messageBody = $message->getMessageBody();
// do something

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

4112d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d46d2c834bd3a53dc8de0421d8f86d42ce24bc59b5409359f884823d9306324?d=identicon)[baocaixiong](/maintainers/baocaixiong)

---

Top Contributors

[![period331](https://avatars.githubusercontent.com/u/2114380?v=4)](https://github.com/period331 "period331 (14 commits)")

---

Tags

aliyunmqs

### Embed Badge

![Health badge](/badges/baocaixiong-aliyun-mqs-lib/health.svg)

```
[![Health](https://phpackages.com/badges/baocaixiong-aliyun-mqs-lib/health.svg)](https://phpackages.com/packages/baocaixiong-aliyun-mqs-lib)
```

###  Alternatives

[cmzz/laravel-aliyun-sms

阿里云短信服务 for Laravel

413.6k](/packages/cmzz-laravel-aliyun-sms)[ivanmitrikeski/laravel-shipping

Shipping package for Laravel. Supported providers: CanadaPost, USPS, UPS, FedEx and Purolator.

206.8k2](/packages/ivanmitrikeski-laravel-shipping)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
