PHPackages                             himedia/php-pzq-api - 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. himedia/php-pzq-api

ActiveLibrary

himedia/php-pzq-api
===================

API for PZQ, a persistent store daemon by Mikko Koppanen which uses the ZeroMQ messaging socket library.

v1.0.2(11y ago)12541LGPL v3PHPPHP &gt;=5.3.2

Since Jul 15Pushed 11y ago3 watchersCompare

[ Source](https://github.com/Hi-Media/php-pzq-api)[ Packagist](https://packagist.org/packages/himedia/php-pzq-api)[ RSS](/packages/himedia-php-pzq-api/feed)WikiDiscussions stable Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

php-pzq-api
===========

[](#php-pzq-api)

PHP API for PZQ, a persistent store daemon by Mikko Koppanen which uses the ZeroMQ messaging socket library.

[![Latest stable version](https://camo.githubusercontent.com/1d418c8ef5e1a831a3f050ee5fd11108a4478f6434f9aa469e8394ab5f1151be/68747470733a2f2f706f7365722e707567782e6f72672f68696d656469612f7068702d707a712d6170692f762f737461626c652e706e67 "Latest stable version")](https://packagist.org/packages/himedia/php-pzq-api)

This is an implementation from the [php-api](https://github.com/mkoppanen/pzq/blob/master/php-api/PZQClient.php) provided by [@mkoppanen](https://github.com/mkoppanen).

Installing via Composer
-----------------------

[](#installing-via-composer)

The recommended way to install PHP PZQ API is through [Composer](http://getcomposer.org).

```
### Install Composer
curl -sS https://getcomposer.org/installer | php
```

Next, update your project's composer.json file to include:

```
{
    "require": {
        "himedia/php-pzq-api": "1.*"
    }
}
```

After installing, you need to require Composer's autoloader:

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

Usage
-----

[](#usage)

### Consumer usage

[](#consumer-usage)

```
$context = new \ZMQContext();
$consumer = new \HIM\PZQ\Consumer($context, "tcp://127.0.0.1:11132");

$ids = array();
for ($i = 0; $i < 10000; $i++) {
    $message = $consumer->consume();
    $consumer->ack($message);
    echo "Consumed {$i}" . PHP_EOL;
}

sleep (5);
```

### Producer usage

[](#producer-usage)

```
$context = new \ZMQContext();
$producer = new \HIM\PZQ\Producer("tcp://127.0.0.1:11131");
$producer->setIgnoreAck(false);

for ($i = 0; $i < 10000; $i++) {
    $message = new \HIM\PZQ\Message();
    $message->setId("id-{$i}");
    $message->setMessage("id-{$i}");
    //echo "Produced id-{$i}" . PHP_EOL;

    $producer->produce($message, 10000);
}
```

### Monitor usage

[](#monitor-usage)

```
$m = new \HIM\PZQ\Monitor("ipc:///tmp/pzq-monitor");
var_dump($m->getStats());
```

Copyrights &amp; licensing
--------------------------

[](#copyrights--licensing)

Licensed under the GNU Lesser General Public License v3 (LGPL version 3). See [LICENSE](LICENSE) file for details.

Change log
----------

[](#change-log)

See [CHANGELOG](CHANGELOG.md) file for details.

Git branching model
-------------------

[](#git-branching-model)

The git branching model used for development is the one described and assisted by `twgit` tool: .

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 96.2% 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

Every ~74 days

Total

3

Last Release

4176d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6edfd239af11b99037d4aa050431c2f8481abe78fd7975516d1c2a351fcf2a6c?d=identicon)[vchabot](/maintainers/vchabot)

---

Top Contributors

[![vchabot](https://avatars.githubusercontent.com/u/715331?v=4)](https://github.com/vchabot "vchabot (25 commits)")[![geoffroy-aubry](https://avatars.githubusercontent.com/u/1247448?v=4)](https://github.com/geoffroy-aubry "geoffroy-aubry (1 commits)")

### Embed Badge

![Health badge](/badges/himedia-php-pzq-api/health.svg)

```
[![Health](https://phpackages.com/badges/himedia-php-pzq-api/health.svg)](https://phpackages.com/packages/himedia-php-pzq-api)
```

PHPackages © 2026

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