Skip to content
This repository was archived by the owner on Sep 22, 2026. It is now read-only.
s12vPublic archive

About

PHP client for Disque

Topics

Resources

Stars

11 stars

Watchers

1 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

Repository files navigation

Build Status Scrutinizer Code Quality Latest Stable Version

phpque

Lightweight and fast Disque PHP client without external dependencies. Supports PHP 5.3, 5.4, 5.5, 5.6, and HHVM.

Installation

composer require s12v/phpque

Usage

<?php

use Phpque\Client;
use Phpque\Connection\ConnectionException;

require '../vendor/autoload.php';

try {
    // Connect to a server pool
    $client = new Client(['tcp://127.0.0.1:7711', 'tcp://127.0.0.1:7712']);

    // ... or to a single server
    $client = new Client('tcp://127.0.0.1:7711');
} catch (ConnectionException $e) {
    // Handle connection errors
    throw $e;
}

// Add a job with payload "some data" and timeout 1 sec
$client->addJob('test_queue', 'some data', 1000);

// Get a job from the queue
$job = $client->getJob(array('test_queue'));

// Acknowledge the job
$client->ackJob($job);

API

Refer to the Disque documentation and ClientInterface

Development

Run tests:

./vendor/bin/phpunit

About

PHP client for Disque

Topics

Resources

Stars

11 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages