New

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

jagarzonpapp/laravel-sqs-sns-subscription-queue

A simple Laravel service provider which adds a new queue connector to handle SNS subscription queues.
4,109

Larablocks Analysis

jagarzonpapp/laravel-sqs-sns-subscription-queue works with Laravel 5 and 6 (latest release v2.4.2, Mar 6, 2020), all past end of life (the last on Sep 6, 2022): 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 and 6, past end of life since Sep 6, 2022
  • No release in the last 12 months (last: Mar 6, 2020)
  • 0 downloads a month (needs 10,000)
  • 0 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Mar 6, 2020.
  • No releases in the last 12 months.
  • First released: Aug 29, 2016.
  • 0 open issues on GitHub.

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

Install
composer require jagarzonpapp/laravel-sqs-sns-subscription-queue
Latest Version:v2.4.2
PHP:>=7.1.3
Laravel:5 · 6
License:MIT
Last Updated:Mar 6, 2020
Links: GitHub  ·  Packagist
Maintainer: muraby

AWS SQS SNS Subscription Queue

Downloads Version

A simple extension to the Illuminate/Queue queue system used in Laravel and Lumen.

Using this connector allows SQS messages originating from a SNS subscription to be worked on with Illuminate\Queue\Jobs\SqsJob.

This is especially useful in a miroservice architecture where multiple services subscribe to a common topic with their queues.

Understand that this package will not handle publishing to SNS, please use the AWS SDK to publish an event to SNS.

Requirements

  • Laravel (tested with version 5.8)
  • or Lumen (tested with version 5.8)

Usage

Add the LaravelSqsSnsSubscriptionQueue ServiceProvider to your application.

Laravel

Registering Service Providers in Laravel

'providers' => [
    // ...
    Joblocal\LaravelSqsSnsSubscriptionQueue\SqsSnsServiceProvider::class,
],

Lumen

Registering Service Providers in Lumen

$app->register(Joblocal\LaravelSqsSnsSubscriptionQueue\SqsSnsServiceProvider::class);

Configuration

You'll need to configure the queue connection in your config/queue.php

'connections' => [
  'sqs-sns' => [
    'driver' => 'sqs-sns',
    'key'    => env('AWS_ACCESS_KEY', 'your-public-key'),
    'secret' => env('AWS_SECRET_ACCESS_KEY', 'your-secret-key'),
    'queue'  => env('QUEUE_URL', 'your-queue-url'),
    'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
    'routes' => [
        // you can use the "Subject" field
        'Subject' => 'App\\Jobs\\YourJob',
        // or the "TopicArn" of your SQS message
        'TopicArn:123' => 'App\\Jobs\\YourJob',
        // to specify which job class should handle the job
    ],
  ],
],

Once the sqs-sns queue connector is configured you can start using it by setting queue driver to 'sqs-sns' in your .env file.

Job class example

use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;

/**
 * Example Job class
 */
class Job implements ShouldQueue
{
  use InteractsWithQueue, Queueable, SerializesModels;

  /**
   * @param string  $subject   SNS Subject
   * @param array   $payload   JSON decoded 'Message'
   */
  public function __construct(string $subject, array $payload)
  {
  }
}

Message transformation

When SNS publishes to SQS queues the received message signature is as follows:

{
  "Type" : "Notification",
  "MessageId" : "63a3f6b6-d533-4a47-aef9-fcf5cf758c76",
  "TopicArn" : "arn:aws:sns:us-west-2:123456789012:MyTopic",
  "Subject" : "Testing publish to subscribed queues",
  "Message" : "Hello world!",
  "Timestamp" : "2017-03-29T05:12:16.901Z",
  "SignatureVersion" : "1",
  "Signature" : "...",
  "SigningCertURL" : "...",
  "UnsubscribeURL" : "..."
} 

Illuminate\Queue\Jobs\SqsJob requires the following signature:

{
  "job": "Illuminate\\Queue\\CallQueuedHandler@call",
  "data": {
    "commandName": "App\\Jobs\\YourJob",
    "command": "...",
  }
}

Installation

The best way to install laravel-sqs-sns-subscription is by using Composer.

To install the most recent version:

php composer.phar require joblocal/laravel-sqs-sns-subscription-queue

Alternatives to jagarzonpapp/laravel-sqs-sns-subscription-queue

shiftonelabs/laravel-sqs-fifo-queue

Adds a Laravel queue driver for Amazon SQS FIFO queues.

7,981,111 153
dusterio/laravel-aws-worker

Run Laravel (or Lumen) tasks and queue listeners inside of AWS Elastic Beanstalk...

6,158,286 306
pod-point/laravel-aws-pubsub

A Laravel broadcasting driver and queue driver that broadcasts and listens to pu...

105,452 10
renatomaldonado/laravel-sqs-consume

Consumer of sqs message

11,267 2

Version History

Version Released PHP Laravel License
v2.4.2 >=7.1.3 ^5.6|^6.0 MIT
v2.4.1 >=7.1.3 ^5.6|^6.0 MIT
v2.4 >=7.1.3 ^5.6|^6.0 MIT
v2.3.4 >=7.1.3 ^5.6 MIT
v2.3.3 >=7.1.3 ^5.6 MIT