PHPackages                             not-empty/omniq - 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. not-empty/omniq

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

not-empty/omniq
===============

OmniQ - Redis+Lua queue PHP SDK

4.0.0(1mo ago)00GPL-3.0-or-laterPHPPHP ^8.3

Since May 3Pushed 1mo agoCompare

[ Source](https://github.com/not-empty/omniq-php)[ Packagist](https://packagist.org/packages/not-empty/omniq)[ RSS](/packages/not-empty-omniq/feed)WikiDiscussions main Synced 1w ago

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

OmniQ (PHP)
===========

[](#omniq-php)

PHP SDK for **OmniQ**, the Redis + Lua queue with deterministic behavior across languages.

This SDK follows the OmniQ core contract and uses the same Lua scripts as the reference implementations.

Status
------

[](#status)

Current implementation covers:

- publish / publishJson
- reserve
- heartbeat
- ackSuccess / ackFail
- promoteDelayed / reapExpired
- pause / resume / isPaused
- retryFailed / retryFailedBatch
- removeJob / removeJobsBatch
- childsInit / childAck
- consume

The consumer path has smoke coverage for:

- success flow
- failure flow
- heartbeat on long-running jobs
- lost lease handling
- graceful drain on `SIGTERM`
- fast exit on `SIGINT` with `drain=false`
- pause / resume
- grouped jobs and group limits
- child workflow primitives

Requirements
------------

[](#requirements)

- PHP 8.3+
- `ext-redis`
- `ext-pcntl`
- Redis or Valkey with Lua enabled

This SDK uses `phpredis` as the transport. When using `host`/`port`, the transport attempts `RedisCluster` first and falls back to plain `Redis` when the target is not cluster-enabled, mirroring the Python SDK behavior.

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

[](#installation)

```
composer require not-empty/omniq
```

Development Environment
-----------------------

[](#development-environment)

This repository includes a local Docker setup:

```
docker compose up -d
docker compose exec omniq-php sh
composer install
```

Services:

- `omniq-redis`
- `omniq-valkey`
- `omniq-php`

Quick Start
-----------

[](#quick-start)

### Publish

[](#publish)

```
