PHPackages                             jellelampaert/ci4\_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. jellelampaert/ci4\_queue

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

jellelampaert/ci4\_queue
========================

CodeIgniter4 queuing system

v0.1(4y ago)06MITPHPPHP ^7.3 || ^8.0

Since Feb 2Pushed 4y ago1 watchersCompare

[ Source](https://github.com/jellelampaert/ci4_queue)[ Packagist](https://packagist.org/packages/jellelampaert/ci4_queue)[ RSS](/packages/jellelampaert-ci4-queue/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

CodeIgniter4 queuing system
===========================

[](#codeigniter4-queuing-system)

Queue tasks that depend on external services (like e-mail) in the database. Process the queue asynchronous (i.e. by using a cronjob), so the user does not have to wait for that service to respond.

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

[](#installation)

Install the package through [Composer](http://getcomposer.org/).

Run the Composer require command from the Terminal:

```
composer require jellelampaert/ci4_queue

```

Once installed, make sure your database is setup correctly and run the migration

```
php spark migrate -all

```

Usage
-----

[](#usage)

How to load the library

```
$queue = new \jellelampaert\ci4_queue\Queue();
$queue->queue('email')->add(array(
    'to'        => 'test@example.com',
    'subject'   => 'This is a test',
    'message'   => 'Testing, attention please'
));
```

The queuing system has the following methods:

### Queue::queue($queue)

[](#queuequeuequeue)

Define the queue you want to use. Your application can have different queues, i.e. a queue for e-mails, a queue for webhooks, ...

### Queue::add($data)

[](#queueadddata)

Add a task to the queue. The argument can be anything: a number, a string, an array, an object, ... Make sure to define a queuename first

```
$queue = new Queue();
$queue->queue('email')->add(array(
    'to'        => 'test@example.com',
    'subject'   => 'This is a test',
    'message'   => 'Testing, attention please'
));
```

### Queue::clean($hours)

[](#queuecleanhours)

Delete all tasks from a queue that are processed more than x hours ago.

```
$queue = new Queue();
$queue->queue('email')->clean(24);
```

### Queue::cleanAll($hours)

[](#queuecleanallhours)

Delete all tasks from all queues that are processed more than x hours ago.

```
$queue = new Queue();
$queue->cleanAll(24);
```

### Queue::delete($id)

[](#queuedeleteid)

Delete a task from the database.

```
$queue = new Queue();
$queue->delete(1);
```

### Queue::getAllTasks()

[](#queuegetalltasks)

Gets all tasks in the queue, whether they are processed or not

```
$queue = new Queue();
$queue->queue('email')->getAllTasks();
```

### Queue::getAllUnprocessed()

[](#queuegetallunprocessed)

Gets all unprocessed tasks from every queue in the database.

```
$queue = new Queue();
$queue->getAllUnprocessed();
```

### Queue::getTask($id)

[](#queuegettaskid)

Gets a task by it's ID

```
$queue = new Queue();
$queue->getTask(1);
```

### Queue::getUnprocessed()

[](#queuegetunprocessed)

Get all unprocessed tasks from a queue.

```
$queue = new Queue();
$queue->queue('email')->getUnprocessed();
```

### Queue::setProcessed($id)

[](#queuesetprocessedid)

Sets a task as processed.

```
$queue = new Queue();
$queue->queue('email')->setProcessed(1);
```

### Queue::setResponse($id, $data)

[](#queuesetresponseid-data)

Sets the response of a task. This can be used for logging purposes or debugging

```
$queue = new Queue();
$queue->setResponse(1, 'HTTP Error 404');
```

License
-------

[](#license)

This package is free software distributed under the terms of the [MIT license](LICENSE.md).

###  Health Score

21

—

LowBetter than 17% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Unknown

Total

1

Last Release

1658d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3541955?v=4)[Jelle Lampaert](/maintainers/JelleLampaert)[@jellelampaert](https://github.com/jellelampaert)

---

Top Contributors

[![jellelampaert](https://avatars.githubusercontent.com/u/3541955?v=4)](https://github.com/jellelampaert "jellelampaert (1 commits)")

---

Tags

queuecodeigniter4

### Embed Badge

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

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

###  Alternatives

[php-amqplib/php-amqplib

Formerly videlalvaro/php-amqplib. This library is a pure PHP implementation of the AMQP protocol. It's been tested against RabbitMQ.

4.6k134.6M1.1k](/packages/php-amqplib-php-amqplib)[ramsey/collection

A PHP library for representing and manipulating collections.

1.2k543.8M105](/packages/ramsey-collection)[queue-interop/queue-interop

Promoting the interoperability of MQs objects. Based on Java JMS

48132.2M100](/packages/queue-interop-queue-interop)[phootwork/collection

The phootwork library fills gaps in the php language and provides better solutions than the existing ones php offers.

3929.3M15](/packages/phootwork-collection)[abydahana/aksara

Aksara is a modern, developer-friendly framework and CMS built on CodeIgniter 4, featuring rapid CRUD development, modular architecture, smart routing, flexible access control, API integration, and an AI assistant to make content management faster and smarter.

1141.2k](/packages/abydahana-aksara)[apinstein/jqjobs

Async job manager for PHP.

3220.2k](/packages/apinstein-jqjobs)

PHPackages © 2026

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