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

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

crysalead/queue
===============

Simple queue consumer framework that supports message dispatching.

110.0k↓25.6%PHP

Since May 23Pushed 1y ago2 watchersCompare

[ Source](https://github.com/crysalead/queue)[ Packagist](https://packagist.org/packages/crysalead/queue)[ RSS](/packages/crysalead-queue/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Queue
=====

[](#queue)

[![Build Status](https://camo.githubusercontent.com/172b51049dd062f4cc20e89d0473fc7c36d868b4fee23fb7e83413a277c9d24d/68747470733a2f2f7472617669732d63692e636f6d2f63727973616c6561642f71756575652e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/crysalead/queue)

Install
-------

[](#install)

```
composer require crysalead/queue
```

Basic usage
-----------

[](#basic-usage)

### Create Queue instance

[](#create-queue-instance)

```
$broker = new Lead\Queue\Adapter\Sqs(
    "https://queue.url",
    new SqsClient([
        'version' => 'latest',
        'region' => '',
        'credentials' => [
            'key'=> '',
            'secret'=>''
        ]
    ])
);
```

### Listen on queue

[](#listen-on-queue)

Listening is a **blocking** call and runs in an infinite loop (up to default 20s polling timout). Your callback will be triggered when a new Message has arrived.

```
$broker->listen(function($job) {

	if (!$job) {
		return;
	}
	/**
	 *
	 *  Process the job...
	 *
	 */

	// Delete the job from Queue.
	$job->delete();

});
```

### Shutting down the Queue

[](#shutting-down-the-queue)

You may shutdown the queue by using the `shutdown()` method.

The Queue instance will respond to PCNTL signals in a safe manner that will not interrupt in the middle of Message processing. You can install signal handlers in your code to cleanly and safely shutdown the service.

```
pcntl_signal(
	SIGINT,
	function() use ($broker) {
		$broker->shutdown();

	}
);
```

### Acknowledgements

[](#acknowledgements)

- [Syndicate](https://github.com/nimbly/Syndicate) (this repo is a simple fork of his brillant work).

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1306941?v=4)[Simon JAILLET](/maintainers/jails)[@jails](https://github.com/jails)

---

Top Contributors

[![jails](https://avatars.githubusercontent.com/u/1306941?v=4)](https://github.com/jails "jails (7 commits)")

### Embed Badge

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

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

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.6M31](/packages/league-geotools)[illuminate/bus

The Illuminate Bus package.

6046.3M541](/packages/illuminate-bus)[uecode/qpush-bundle

Asynchronous processing for Symfony using Push Queues

1672.5M2](/packages/uecode-qpush-bundle)[belvg/module-sqs

N/A

1544.6k](/packages/belvg-module-sqs)[bsidev/bitrix-queue

Queues for Bitrix CMS

232.8k](/packages/bsidev-bitrix-queue)[mayconbordin/l5-stomp-queue

Stomp Queue Driver for Laravel 5

121.1k](/packages/mayconbordin-l5-stomp-queue)

PHPackages © 2026

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