PHPackages                             ndthuan/aws-sqs-wrapper - 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. ndthuan/aws-sqs-wrapper

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

ndthuan/aws-sqs-wrapper
=======================

library for simplified SQS queue messages processing

v1.1.0(7y ago)211MITPHPPHP ^7.0

Since Nov 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ndthuan/aws-sqs-wrapper)[ Packagist](https://packagist.org/packages/ndthuan/aws-sqs-wrapper)[ RSS](/packages/ndthuan-aws-sqs-wrapper/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

aws-sqs-wrapper
===============

[](#aws-sqs-wrapper)

PHP library for simplified SQS queue messages processing.

[![Build Status](https://camo.githubusercontent.com/67a7cda4cf8f0242501dae1721184214b1d343678010e9fae348974b3031cf32/68747470733a2f2f7472617669732d63692e6f72672f6e64746875616e2f6177732d7371732d777261707065722e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/67a7cda4cf8f0242501dae1721184214b1d343678010e9fae348974b3031cf32/68747470733a2f2f7472617669732d63692e6f72672f6e64746875616e2f6177732d7371732d777261707065722e7376673f6272616e63683d6d6173746572)

Introduction
------------

[](#introduction)

- This library converts send/receive/delete SQS messages results into objects. This enables you to utilize code autocompletion without memorizing common attribute names.
- It removes your boilerplate code by introducing simplified send/receive/delete methods.
- It decouples publishing and subscribing responsibilities so that your business logic is free from infrastructure awareness.

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

[](#installation)

```
composer require ndthuan/aws-sqs-wrapper
```

Usage
-----

[](#usage)

### Sending a message

[](#sending-a-message)

```
use Aws\Sqs\SqsClient;
use Ndthuan\AwsSqsWrapper\Publishing\Publisher;
use Ndthuan\AwsSqsWrapper\Queue\Connector;

$queueUrl = ''; // get this from your own AWS SQS setup

// creating a publisher
$sqsClient = new SqsClient(...);
$queueConnector = new Connector($sqsClient, $queueUrl);
$publisher = new Publisher($queueConnector);

// send a string message
$publisher->publishString('My message body');
// or send a json serializable object/array
$myMessage = [
    'my' => 'data',
];
$publisher->publishJsonSerializable($myMessage);
```

### Subscribing to a queue

[](#subscribing-to-a-queue)

```
use Aws\Sqs\SqsClient;
use Ndthuan\AwsSqsWrapper\Queue\Connector;
use Ndthuan\AwsSqsWrapper\Queue\ReceivedMessage;
use Ndthuan\AwsSqsWrapper\Queue\ResultMetadata;
use Ndthuan\AwsSqsWrapper\Subscribing\DelegatorSubscriber;

// defining a message processor
class MyMessageProcessor implements MessageProcessorInterface
{
    /**
     * @inheritdoc
     */
    public function processMessage(ReceivedMessage $message, ResultMetadata $resultMetadata)
    {
        // your processing logic
    }
}

$queueUrl = ''; // get this from your own AWS SQS setup

// creating a subscriber
$sqsClient = new SqsClient(...);
$queueConnector = new Connector($sqsClient, $queueUrl);
$subscriber = new DelegatorSubscriber(new MyMessageProcessor(), $queueConnector);

// run the subscriber
$subscriber->pullAndProcessMessages();
```

Exception handling
------------------

[](#exception-handling)

A message processor may throw exceptions or errors. Subscriber will react differently depending on exception type:

- On `LogicException` and `ValidationFailureException`: the corresponding message is deleted from queue and the subscriber continues to process other messages.
- On `FatalException`: the corresponding message is not deleted from queue but the subscriber stops processing and bubbles up the exception.
- On other kinds of `\Throwable`: the corresponding message is not deleted from queue and the subscriber continues to process other messages.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Total

2

Last Release

2726d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6786d3fa1703e4e240d9c5612650d7131728d6ceab16c7129983bcb6dece0207?d=identicon)[ndthuan](/maintainers/ndthuan)

---

Top Contributors

[![ndthuan](https://avatars.githubusercontent.com/u/1289717?v=4)](https://github.com/ndthuan "ndthuan (10 commits)")

---

Tags

awsaws-sqs-wrapperphpphp-libraryphp7php70php71php72php73sqssqs-clientsqs-consumersqs-interfacesqs-messagesqs-pollersqs-queuesqs-queues

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ndthuan-aws-sqs-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/ndthuan-aws-sqs-wrapper/health.svg)](https://phpackages.com/packages/ndthuan-aws-sqs-wrapper)
```

###  Alternatives

[symfony/messenger

Helps applications send and receive messages to/from other applications or via message queues

1.1k120.7M958](/packages/symfony-messenger)[symfony/amazon-sqs-messenger

Symfony Amazon SQS extension Messenger Bridge

4612.5M15](/packages/symfony-amazon-sqs-messenger)[pmg/queue

A task queue framework for PHP

13460.6k8](/packages/pmg-queue)[palpalani/laravel-sqs-queue-json-reader

Custom SQS queue reader for Laravel

26109.8k](/packages/palpalani-laravel-sqs-queue-json-reader)[webfactory/icu-translation-bundle

Enables ICU message formatting for translations in Symfony applications.

2761.8k](/packages/webfactory-icu-translation-bundle)

PHPackages © 2026

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