PHPackages                             lokielse/laravel-mns - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. lokielse/laravel-mns

ActiveLibrary[Queues &amp; Workers](/categories/queues)

lokielse/laravel-mns
====================

Aliyun MNS Queue Driver For Laravel

v1.1.2(7y ago)2614.9k↓100%5[1 PRs](https://github.com/lokielse/laravel-mns/pulls)MITPHPPHP ~5.5|~7.0

Since Jul 11Pushed 6y ago2 watchersCompare

[ Source](https://github.com/lokielse/laravel-mns)[ Packagist](https://packagist.org/packages/lokielse/laravel-mns)[ Docs](https://github.com/lokielse/laravel-mns)[ RSS](/packages/lokielse-laravel-mns/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (15)Used By (0)

Aliyun MNS Queue Driver For Laravel
===================================

[](#aliyun-mns-queue-driver-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ddf506f3bdad69e3c14a3649c7beba4fe78161f22ac067a0dd35f97b23367be8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6f6b69656c73652f6c61726176656c2d6d6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lokielse/laravel-mns)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/e227f64fa7a764ac23b9a716df8d8b9f1af766b496f8ee3d24ef423d4f8e776c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6f6b69656c73652f6c61726176656c2d6d6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/lokielse/laravel-mns)

Install
-------

[](#install)

Via Composer

```
$ composer require lokielse/laravel-mns
```

Config
------

[](#config)

Add following service providers into your providers array in `config/app.php`

```
Lokielse\LaravelMNS\LaravelMNSServiceProvider::class
```

Edit your `config/queue.php`, add `mns` connection

```
'mns'        => [
	'driver'       => 'mns',
	'key'          => env('QUEUE_MNS_ACCESS_KEY'),
	'secret'       => env('QUEUE_MNS_SECRET_KEY'),
	'endpoint'     => env('QUEUE_MNS_ENDPOINT'),
	'queue'        => env('QUEUE_NAME'),
	'wait_seconds' => 30,
]
```

About [wait\_seconds](https://help.aliyun.com/document_detail/35136.html)

Edit your `.env` file

```
QUEUE_DRIVER=mns
QUEUE_NAME=foobar-local
QUEUE_MNS_ACCESS_KEY=your_acccess_key
QUEUE_MNS_SECRET_KEY=your_secret_key
QUEUE_MNS_ENDPOINT=http://12345678910.mns.cn-hangzhou.aliyuncs.com/
```

You should update `QUEUE_MNS_ENDPOINT` to `internal endpoint` in production mode

Usage
-----

[](#usage)

First create a queue and get queue endpoint at [Aliyun MNS Console](https://mns.console.aliyun.com/)

Then update `MNS_ENDPOINT` in `.env`

Push a test message to queue

```
Queue::push(function($job){
	/**
	 * Your statments go here
	 */
	$job->delete();
});
```

Create queue listener, run command in terminal

```
$ php artisan queue:listen
```

Commands
--------

[](#commands)

Flush MNS messages on Aliyun

```
$ php artisan queue:mns:flush
```

Security
--------

[](#security)

Create RAM access control at [Aliyun RAM Console](https://ram.console.aliyun.com)

1. Create a custom policy such as `AliyunMNSFullAccessFoobar`

    ```
    {
      "Version": "1",
      "Statement": [
    	{
    	  "Action": "mns:*",
    	  "Resource": [
    		"acs:mns:*:*:*/foobar-local",
    		"acs:mns:*:*:*/foobar-sandbox",
    		"acs:mns:*:*:*/foobar-production"
    	  ],
    	  "Effect": "Allow"
    	}
      ]
    }

    ```
2. Create a user for you app such as `foobar`
3. Assign the policy `AliyunMNSFullAccessFoobar` to the user `foobar`
4. Create and get the `AccessKeyId` and `AccessKeySecret` for user `foorbar`
5. update `QUEUE_MNS_ACCESS_KEY` and `QUEUE_MNS_ACCESS_SECRET` in `.env`

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Credits
-------

[](#credits)

- [Loki Else](https://github.com/lokielse)
- [abrahamgreyson](https://github.com/abrahamgreyson/laravel-mns)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 96.2% 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 ~52 days

Recently: every ~101 days

Total

14

Last Release

2918d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cc86898863e8b4ab04e11e787c662480a6ca08628df871ecfe8015e3277746b8?d=identicon)[waisir](/maintainers/waisir)

---

Top Contributors

[![lokielse](https://avatars.githubusercontent.com/u/1573211?v=4)](https://github.com/lokielse "lokielse (25 commits)")[![antik-x](https://avatars.githubusercontent.com/u/774873?v=4)](https://github.com/antik-x "antik-x (1 commits)")

---

Tags

aliyunlaravelmnsqueuelaravelcloudqueuedriveraliyunmtsonslokielselaravel-mns

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/lokielse-laravel-mns/health.svg)

```
[![Health](https://phpackages.com/badges/lokielse-laravel-mns/health.svg)](https://phpackages.com/packages/lokielse-laravel-mns)
```

###  Alternatives

[stackkit/laravel-google-cloud-tasks-queue

Google Cloud Tasks queue driver for Laravel

84570.1k](/packages/stackkit-laravel-google-cloud-tasks-queue)[mpbarlow/laravel-queue-debouncer

A wrapper job for debouncing other queue jobs.

63714.4k1](/packages/mpbarlow-laravel-queue-debouncer)[convenia/pigeon

3233.0k](/packages/convenia-pigeon)[lokielse/laravel-sls

Aliyun SLS Log For Laravel

223.7k](/packages/lokielse-laravel-sls)

PHPackages © 2026

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