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

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

charcoal/queue
==============

Queue, Queue items and Queueable objects for Charcoal

v5.0.0(2y ago)0181MITPHPPHP ^7.4 || ^8.0

Since May 19Pushed 2y ago2 watchersCompare

[ Source](https://github.com/charcoalphp/queue)[ Packagist](https://packagist.org/packages/charcoal/queue)[ Docs](https://charcoal.locomotive.ca)[ RSS](/packages/charcoal-queue/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (34)Used By (1)

Charcoal Queue
==============

[](#charcoal-queue)

The Queue package provides an abstract queue service to defer the processing of time consuming tasks.

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

[](#installation)

```
composer require charcoal/queue
```

Usage
-----

[](#usage)

### Queueing System

[](#queueing-system)

Queue managers loop queue items. Queue items represent actions to be performed (as defined by the `process()` method).

### Queue Manager

[](#queue-manager)

The queue manager is available as an abstract class: `AbstractQueueManager`. This class implements the `QueueManagerInterface`.

The processing speed (throttle) can be controlled via the `rate` property, in items per second.

The batch limit (number of items to process per iteration) can be controlled with the `limit` property.

The queue can be identified with the `queue_id`. It can be set with `setQueueId()`.

The queue can be processed with `processQueue()`. If for any reason the items need to be loaded, it can be done with `loadQueueItems()`.

There are 4 callbacks that can be defined:

- `setProcessedCallback()`
- `setItemCallback()`
- `setItemSuccessCallbak()`
- `setItemFailureCallback()`

There are only 1 abstract method:

- `queueItemProto()` which must returns a `QueueItemInterface` instance

### Queue Items

[](#queue-items)

Queue Items should implement the `QueueItemInterface`. This can be helped via the `QueueItemTrait`.

Queue items can be identified with a `queue_id`. (The same `queue_id` used by the queue manager).

Items can be processed with `process($callback, $successCallback, $failureCallback)`.

The queue item properties are:

- `queue_id`
- `queue_item_data`
- `queued_date`
- `processing_date`
- `processed_date`
- `processed`

### Queuable Objects

[](#queuable-objects)

The `QueueableInterface` defines objects that can be queued. This interface is really simple and only provides:

- `setQueueId()` which can be inherited from `QueueableTrait`
- `queueId()` (`queue_id` getter) which can be inherited from `QueueableTrait`
- `queue($ts = null)` which is abstract and must be written inside class which implement the queueable interface

Resources
---------

[](#resources)

- [Contributing](https://github.com/charcoalphp/.github/blob/main/CONTRIBUTING.md)
- [Report issues](https://github.com/charcoalphp/charcoal/issues) and [send pull requests](https://github.com/charcoalphp/charcoal/pulls)in the [main Charcoal repository](https://github.com/charcoalphp/charcoal)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity79

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

Recently: every ~15 days

Total

33

Last Release

796d ago

Major Versions

0.5.0 → v2.1.22022-06-21

v2.2.3 → v3.1.02022-08-08

v3.1.8 → v4.0.02022-09-21

v4.1.0 → v5.0.02024-03-13

PHP version history (3 changes)0.1PHP &gt;=5.5.0

0.2PHP &gt;=5.6.0

v2.1.2PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/cfb071c0ff7ce9500c528a003a2c53124248debc3e5bf367c17f89f5e6136125?d=identicon)[mducharme](/maintainers/mducharme)

![](https://www.gravatar.com/avatar/0a4f39523b4b2837562ba0848a0327b8d340118d1ba87cb0f5d59b1d5cb6beba?d=identicon)[mcaskill](/maintainers/mcaskill)

![](https://www.gravatar.com/avatar/f3f29e38395113e2400bdd7e51bea982b17f120d4d5a53d4473b53118ee46f8d?d=identicon)[JoelAlphonso](/maintainers/JoelAlphonso)

![](https://www.gravatar.com/avatar/4229f19eecd12c2b651b6502dcc5adfba48c5770db3d2dbea55fc92c7a246b2b?d=identicon)[BeneRoch](/maintainers/BeneRoch)

---

Top Contributors

[![mcaskill](https://avatars.githubusercontent.com/u/29353?v=4)](https://github.com/mcaskill "mcaskill (28 commits)")[![mducharme](https://avatars.githubusercontent.com/u/12157?v=4)](https://github.com/mducharme "mducharme (22 commits)")[![actions-user](https://avatars.githubusercontent.com/u/65916846?v=4)](https://github.com/actions-user "actions-user (15 commits)")[![JoelAlphonso](https://avatars.githubusercontent.com/u/10762266?v=4)](https://github.com/JoelAlphonso "JoelAlphonso (12 commits)")[![losted](https://avatars.githubusercontent.com/u/165665?v=4)](https://github.com/losted "losted (2 commits)")

---

Tags

phpqueueread-only-repositoryqueuecharcoal

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[php-amqplib/rabbitmq-bundle

Integrates php-amqplib with Symfony &amp; RabbitMq. Formerly emag-tech-labs/rabbitmq-bundle, oldsound/rabbitmq-bundle.

1.3k20.1M65](/packages/php-amqplib-rabbitmq-bundle)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[swarrot/swarrot

A simple lib to consume RabbitMQ queues

3654.4M8](/packages/swarrot-swarrot)[koco/messenger-kafka

Symfony Messenger Kafka Transport

931.1M1](/packages/koco-messenger-kafka)[josegonzalez/queuesadilla

Queue background jobs to any backend system

96508.2k2](/packages/josegonzalez-queuesadilla)[prolic/humus-amqp

PHP-AMQP library with RabbitMQ Extensions

76205.4k5](/packages/prolic-humus-amqp)

PHPackages © 2026

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