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

ActiveLibrary

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 1mo ago

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

2722d 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

[api-platform/metadata

API Resource-oriented metadata attributes and factories

223.5M96](/packages/api-platform-metadata)[keboola/storage-api-client

Keboola Storage API PHP Client

10387.5k25](/packages/keboola-storage-api-client)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1344.8k1](/packages/jasara-php-amzn-selling-partner-api)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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