PHPackages                             vaibhavpandeyvpz/qatar - 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. [Caching](/categories/caching)
4. /
5. vaibhavpandeyvpz/qatar

ActiveLibrary[Caching](/categories/caching)

vaibhavpandeyvpz/qatar
======================

Framework agnostic PHP library for publishing and consuming jobs using Redis and ElasticMQ backends.

1.0.0(4mo ago)2291MITPHPPHP ^8.2CI passing

Since Dec 31Pushed 4mo agoCompare

[ Source](https://github.com/vaibhavpandeyvpz/qatar)[ Packagist](https://packagist.org/packages/vaibhavpandeyvpz/qatar)[ Docs](https://github.com/vaibhavpandeyvpz/qatar)[ RSS](/packages/vaibhavpandeyvpz-qatar/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (1)

Qatar (कतार)
============

[](#qatar-कतार)

Framework agnostic PHP library for publishing and consuming jobs using Redis and ElasticMQ/SQS backends.

> Qatar: `कतार` (Queue)

[![Latest Version](https://camo.githubusercontent.com/aff5b9a35697fe64bb7e82de2a8f6624f8b3078549a431d8c03d06b11d7e6de7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7661696268617670616e64657976707a2f71617461722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vaibhavpandeyvpz/qatar)[![Build Status](https://camo.githubusercontent.com/fea768cf91914f3c0c39751faffb45a545ebc278261c8119470a3b6a7e540bc3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7661696268617670616e64657976707a2f71617461722f74657374732e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265)](https://github.com/vaibhavpandeyvpz/qatar/actions)[![Downloads](https://camo.githubusercontent.com/24e4d856c97e70ca91f22bcfc7ca83e3cf31b68cc4a987837f9da5e7edfb0b1f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7661696268617670616e64657976707a2f71617461722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vaibhavpandeyvpz/qatar)[![PHP Version](https://camo.githubusercontent.com/2c6c2a03f84d1e12bac569f5a9a04b51dd7d92fe6e22d90159a71f9dd810f711/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7661696268617670616e64657976707a2f71617461722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vaibhavpandeyvpz/qatar)[![License](https://camo.githubusercontent.com/f9566a7dcbc9ff70dc7ad8502f6d6df56069df4e8c9549e27e9c9ae9839ab7f7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7661696268617670616e64657976707a2f71617461722e7376673f7374796c653d666c61742d737175617265)](LICENSE)

Features
--------

[](#features)

- 🚀 **Fast**: Efficient job processing with Redis or ElasticMQ/SQS backends
- 🔄 **Reliable**: Automatic retries with configurable delays
- ⏰ **Delayed Jobs**: Schedule jobs to run in the future
- 👷 **Multiple Workers**: Run multiple workers concurrently
- 🎯 **Simple API**: Clean, intuitive interface for job management
- 🔧 **Flexible**: Framework agnostic - use with any PHP application
- 📝 **Type-safe**: Full PHP 8.2+ type hints and modern language features
- ⚡ **Graceful Shutdown**: Workers handle termination signals properly
- 💾 **Two Backends**: Choose between Redis (fast) or ElasticMQ/SQS (distributed).
    - *Note: Backend-specific drivers (`predis` or `aws-sdk-php`) are suggested and must be installed separately.*

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

[](#requirements)

- PHP 8.2 or higher
- Redis server + [PhpRedis](https://github.com/phpredis/phpredis) OR [`predis/predis`](https://packagist.org/packages/predis/predis) (for `RedisQueue`)
- ElasticMQ or AWS SQS + [`aws/aws-sdk-php`](https://packagist.org/packages/aws/aws-sdk-php) (for `ElasticMQQueue`)
- JSON extension (`ext-json`) for payload serialization (usually enabled by default)

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

[](#installation)

Install via Composer:

```
composer require vaibhavpandeyvpz/qatar
```

Local Development Setup
-----------------------

[](#local-development-setup)

For local testing, use Docker Compose to run Redis and ElasticMQ:

```
# Start services
docker-compose up -d

# Verify services are running
docker-compose ps

# Run tests
./vendor/bin/phpunit
```

This will start:

- **Redis** on `localhost:6379`
- **ElasticMQ** on `localhost:9324` (SQS-compatible API)
- **ElasticMQ UI** on `localhost:9325` (monitoring)

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

[](#quick-start)

### Creating a Job

[](#creating-a-job)

Implementing `Qatar\Job` is simple:

```
