PHPackages                             dirk39/sqs-manager - 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. dirk39/sqs-manager

AbandonedArchivedLibrary

dirk39/sqs-manager
==================

Simple library that fetch and manage messages from SQS Queue

v1.0.2(7y ago)161mitPHP

Since Mar 31Pushed 3y ago2 watchersCompare

[ Source](https://github.com/dirk39/sqs-manager)[ Packagist](https://packagist.org/packages/dirk39/sqs-manager)[ RSS](/packages/dirk39-sqs-manager/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (8)Used By (0)

SQS Manager
===========

[](#sqs-manager)

[![Build Status](https://camo.githubusercontent.com/62b8e7975690a772da36b839720153ea6603bd5094c8ffd84da295dad6edf4f7/68747470733a2f2f7472617669732d63692e6f72672f6469726b33392f7371732d6d616e616765722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/dirk39/sqs-manager)

SQS Manager is a library that simplifies fetching of messages from a SQS Queue. SQS Manager reads messages from the queue you want, prepares a `SQSManager\Message` object and pass it to function or method you define. The main advantages of this libray are:

- After the message has been depleted will be deleted from the queue by the Manager.
- If an exception is caught by the Manager, remaining messages will be released and the caught exception will be thrown.
- If the Manager retrieves several messages, it will pass them one by one to designed method/function. Afterwards the Manager will check `VisibilityTimeout` of remaining messages and in case of short expiry date, it will extend the expiration according to the `VisibilityTimeout` value. According to the [AWS SQS documetation](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html), the maximum timeout is 12 hours.

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

[](#installation)

SQSManager can be installed by composer

```
composer install dirk39/sqs-manager

```

Documentation
-------------

[](#documentation)

Usage of SQS Manager is very straightforward.

#### Construct

[](#construct)

```
require_once 'vendor/autoload.php';

$manager = new SQSManager\Manager('AWS_APP_ID', 'AWS_APP_SECRET', 'AWS_REGION', $additional_conf);
```

In `$additional_conf` array you can add custom configuration for the `Aws\Sqs\SqsClient`. You can find more information about additional conf [here](https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.Sqs.SqsClient.html#___construct).

#### Fetch messages

[](#fetch-messages)

```
....

$manager->run($queueName, $callback, $listenerConfigs);
```

- `$queueName`: the name of the queue you need to fetch. `$queue` could be the name of the queue or its url.
- `$callback`: $callback value will be passed to a `call_user_func`. [Read the docs](http://php.net/manual/en/function.call-user-func.php) about acceptable $callback values. The Manager will pass a `SQSManager\Message` object to your callback function/method.
- `$listenerConfigs`: additional configs pass to `Aws\Sqs\SqsClient::receiveMessage` method. For further information about allowed configs read [here](https://docs.aws.amazon.com/aws-sdk-php/v3/api/api-sqs-2012-11-05.html#receivemessage)

#### Manager configurators

[](#manager-configurators)

- `changeVisibilityTimeout`: change default `VisibilityTimeout` value. It must be an integer between and 0 and 43200 seconds (i.e. 12 hours)
- `setWaitTimeSeconds`: change default `WaitTimeSeconds` value. It must be an integer between and 1 and 20 seconds.
- `setMaxNumberOfMessages`: change default `MaxNumberOfMessages` value. It must be an integer between and 1 and 10.

Testing
-------

[](#testing)

To replicate integration tests you have to copy `tests/config.example.php` into `tests/configs.php` and replace default values for `AWS_KEY`, `AWS_SECRET`, `AWS_REGION`, `AWS_QUEUE_NAME` with your values. Important: AWS credentials must be of a user with read/write permission for Amazon SQS. At the end of the tests, designed queue will be purged of all messages so don't use production SQS queue!

###  Health Score

29

—

LowBetter than 63% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity68

Established project with proven stability

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

Total

3

Last Release

2880d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b573e554f321b974e7cd0151c65b830ccaec710c96eeabd23bbfa8f6585935c?d=identicon)[dirk39](/maintainers/dirk39)

---

Top Contributors

[![dirk39](https://avatars.githubusercontent.com/u/9790058?v=4)](https://github.com/dirk39 "dirk39 (40 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dirk39-sqs-manager/health.svg)

```
[![Health](https://phpackages.com/badges/dirk39-sqs-manager/health.svg)](https://phpackages.com/packages/dirk39-sqs-manager)
```

###  Alternatives

[league/flysystem-aws-s3-v3

AWS S3 filesystem adapter for Flysystem.

1.6k257.1M691](/packages/league-flysystem-aws-s3-v3)[aws/aws-sdk-php-laravel

A simple Laravel 6/7/8/9/10/11/12 service provider for including the AWS SDK for PHP.

1.7k34.8M70](/packages/aws-aws-sdk-php-laravel)

PHPackages © 2026

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