New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

lokielse/laravel-mns

Aliyun MNS Queue Driver For Laravel
14,914 26

Larablocks Analysis

lokielse/laravel-mns works with Laravel 5 (latest release v1.1.2, May 16, 2018), which reached end of life: no more fixes, even for security.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • Supports only Laravel 5, past end of life
  • No release in the last 12 months (last: May 16, 2018)
  • 39 downloads a month (needs 10,000)
  • 26 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: May 16, 2018.
  • No releases in the last 12 months.
  • First released: Jul 11, 2016.
  • Monthly downloads: 39, up 3800% from six months ago.
  • 2 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 3, 2026.

Install
composer require lokielse/laravel-mns
Latest Version:v1.1.2
PHP:~5.5|~7.0
Laravel:5
License:MIT
Last Updated:Sep 19, 2019
Links: GitHub  ·  Packagist
Maintainer: waisir

Aliyun MNS Queue Driver For Laravel

Latest Version on Packagist Software License Total Downloads

Install

Via Composer

$ composer require lokielse/laravel-mns

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

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

First create a queue and get queue endpoint at Aliyun MNS Console

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

Flush MNS messages on Aliyun

$ php artisan queue:mns:flush

Security

Create RAM access control at Aliyun RAM Console

  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

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

Alternatives to lokielse/laravel-mns

stackkit/laravel-google-cloud-tasks-queue

Google Cloud Tasks queue driver for Laravel

952,851 89
avto-dev/amqp-rabbit-laravel-queue

RabbitMQ laravel queue driver

38,772 9
offload-project/laravel-google-pubsub

Google Cloud Pub/Sub for Laravel with full feature support

5,559 10
elielelie/laravel-activemq

Laravel ActiveMQ driver

5,432 0
asseco-voice/laravel-stomp

Laravel Stomp driver

8,817 5

Version History

Version Released PHP Laravel License
v1.1.2 ~5.5|~7.0 ~5.1 MIT
v1.1.1 ~5.5|~7.0 ~5.1 MIT
v1.1.0 ~5.5|~7.0 ~5.1 MIT
v1.0.10 ~5.5|~7.0 ~5.1 MIT
v1.0.9 ~5.5|~7.0 ~5.1 MIT