PHPackages                             kfzteile24/queue-bundle - 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. kfzteile24/queue-bundle

ActiveSymfony-bundle[Queues &amp; Workers](/categories/queues)

kfzteile24/queue-bundle
=======================

Provides an abstraction on top of AWS' PHP SDK Sqs- and SnsClient to make it DI friendly.

1.7.0(1y ago)227.8k↓48.8%MITPHPPHP ^7.1CI failing

Since Dec 6Pushed 1y ago26 watchersCompare

[ Source](https://github.com/kfzteile24/queue-bundle)[ Packagist](https://packagist.org/packages/kfzteile24/queue-bundle)[ RSS](/packages/kfzteile24-queue-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (8)Versions (70)Used By (0)

QueueBundle
===========

[](#queuebundle)

This Bundle has been created by refactoring the petsdeli/queue-bundle

Installation
------------

[](#installation)

1. Run the following command to install the bundle

```
composer require kfzteile24/queue-bundle
```

2. Configure the clients you want to use in your application

```
# app/config/config.yml

kfz24_queue:
    clients:
        notify:
            type:                        "sns"
            region:                      "eu-central-1"
            resource:                    "arn:aws:sns:eu-central-1:123456789012:topic"
            access_key:                  "AKIAABCDEFGHIJKLMNOP"
            secret_access_key:           "s3CR3t4Cc3S5K3y"
        one_consumer:
            type:                        "sqs"
            region:                      "eu-central-1"
            resource:                    "https://sqs.eu-central-1.amazonaws.com/123456789012/one-queue"
            access_key:                  "AKIAABCDEFGHIJKLMNOP"
            secret_access_key:           "s3CR3t4Cc3S5K3y"
        another_consumer:
            type:                        "sqs"
            region:                      "eu-central-1"
            resource:                    "https://sqs.eu-central-1.amazonaws.com/123456789012/another-queue"
            access_key:                  "AKIAABCDEFGHIJKLMNOP"
            secret_access_key:           "s3CR3t4Cc3S5K3y"
            large_payload_client:
                region:                  "eu-central-1"
                endpoint:                "http://s3-eu-central-1.amazonaws.com/consumer_bucket"
                bucket:                  "consumer_bucket"
                access_key:              "AKIAABCDEFGHIJKLMNOP"
                secret_access_key:       "s3CR3t4Cc3S5K3y"
                use_path_style_endpoint: "true" | "false"
```

Usage
-----

[](#usage)

Get your configured services from the container

```
/** @var \Kfz24\QueueBundle\Client\Aws\SnsClient $client */
$client = $container->get('kfz24.queue.client.notify');

$client->send([
    'type' => 'notification',
    'data' => [1, 2, 3]
]);
```

or inject them in your services as you see fit.

```

```

What's this about?
------------------

[](#whats-this-about)

The QueueBundle provides an abstraction on top of AWS' PHP SDK `SqsClient` and `SnsClient` and makes them DI friendly. The purpose of the abstraction is to allow for more flexibility than when using the original client implementations directly.

This is particularly the case when you decide to change your queue setup from e.g. a point-to-point queue between 1 producer and 1 consumer to a point-to-multipoint queue setup because you might need a 2nd, 3rd, … consumer processing the same messages. This can easily been achieved by creating an SNS topic and subscribe as many queues as you like to it, instead of sending messages directly to a queue.

Using the native clients has drawbacks in situations like that. They don't share a common interface and expose their respective API methods as class methods. For instance the calls to send a message to either of them look different:

```
$snsClient = new \Aws\Sns\SnsClient([…]);
$sqsClient = new \Aws\Sqs\SqsClient([…]);

$result = $snsClient->publish([
    'Message' => 'My Message'
]);

$result = $sqsClient->sendMessage([
    'MessageBody' => 'My Message'
]);
```

This alone turns an architectural decision of having one or more consumers into a refactoring nightmare. But you would also need awareness of the architecture of your queues on the consumer side. As a matter of facts, the same message looks quite differently depending on whether it was posted directly to the SQS queue or was forwarded there through an SNS topic. Let's assume a message

```
{"foo": "bar"}
```

When sent directly to a queue the `MessageBody` looks as you would expect it:

```
{"foo": "bar"}
```

But if the message was queued through an SNS topic an SNS envelop is added turning the `MessageBody` into:

```
{
    "Type" : "Notification",
    "MessageId" : "4743aa35-e3cd-4562-bd9e-b25778778206",
    "TopicArn" : "arn:aws:sns:eu-central-1:123456789012:sns-test",
    "Message" : "{\"foo\": \"bar\"}",
    "Timestamp" : "2017-05-23T09:58:23.595Z",
    "SignatureVersion" : "1",
    "Signature" : "MDEyMzQ1Njc4OTAwMTIzNDU2Nzg5MDAxMjM0NTY3ODkwMDEyMzQ1Njc4OTAwMTIzNDU2N …",
    "SigningCertURL" : "https://sns.eu-central-1.amazonaws.com/SimpleNotificationService …",
    "UnsubscribeURL" : "https://sns.eu-central-1.amazonaws.com/?Action=Unsubscribe&Subsc …",
    "MessageAttributes" : {
        "AWS.SNS.MOBILE.MPNS.Type" : {"Type":"String","Value":"token"},
        "AWS.SNS.MOBILE.MPNS.NotificationClass" : {"Type":"String","Value":"realtime"},
        "AWS.SNS.MOBILE.WNS.Type" : {"Type":"String","Value":"wns/badge"}
    }
}
```

Therefore this bundle's `SqsClient` implementation detects whether the `MessageBody` contains an SNS envelop and if so first validates its integrity and then automatically unwraps its content. This is completely transparent to you.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance49

Moderate activity, may be stable

Popularity28

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~35 days

Recently: every ~0 days

Total

68

Last Release

376d ago

PHP version history (2 changes)v1.0.0PHP ~7.0

v1.1.1PHP ^7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/9620a48ee56497f899267a5c38d51e4a63fcac17eec5c9214997ac30d801c2bf?d=identicon)[jacMelloni](/maintainers/jacMelloni)

---

Top Contributors

[![jacMelloni](https://avatars.githubusercontent.com/u/17182248?v=4)](https://github.com/jacMelloni "jacMelloni (13 commits)")[![FlorinCR](https://avatars.githubusercontent.com/u/111286433?v=4)](https://github.com/FlorinCR "FlorinCR (4 commits)")[![swilam](https://avatars.githubusercontent.com/u/16304372?v=4)](https://github.com/swilam "swilam (3 commits)")[![unusorin](https://avatars.githubusercontent.com/u/1003231?v=4)](https://github.com/unusorin "unusorin (3 commits)")[![Alymosul](https://avatars.githubusercontent.com/u/8314647?v=4)](https://github.com/Alymosul "Alymosul (2 commits)")[![Felix-Kfz24](https://avatars.githubusercontent.com/u/31883809?v=4)](https://github.com/Felix-Kfz24 "Felix-Kfz24 (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kfzteile24-queue-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/kfzteile24-queue-bundle/health.svg)](https://phpackages.com/packages/kfzteile24-queue-bundle)
```

###  Alternatives

[illuminate/queue

The Illuminate Queue package.

20432.2M1.5k](/packages/illuminate-queue)[dusterio/laravel-aws-worker

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

3075.8M](/packages/dusterio-laravel-aws-worker)[palpalani/laravel-sqs-queue-json-reader

Custom SQS queue reader for Laravel

29120.6k](/packages/palpalani-laravel-sqs-queue-json-reader)[juhasev/laravel-ses

Allows you to track opens, deliveries, bounces, complaints and clicked links when sending emails through Laravel and Amazon SES

1710.2k](/packages/juhasev-laravel-ses)[markocupic/calendar-event-booking-bundle

Contao Calendar Event Booking Bundle

125.1k1](/packages/markocupic-calendar-event-booking-bundle)

PHPackages © 2026

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