PHPackages                             annon/nsqclient - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. annon/nsqclient

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

annon/nsqclient
===============

Yet another NSQ library.

0.0.3(8mo ago)01311MITPHPPHP &gt;=7.1

Since Dec 22Pushed 8mo agoCompare

[ Source](https://github.com/wanganfu/nsqclient)[ Packagist](https://packagist.org/packages/annon/nsqclient)[ RSS](/packages/annon-nsqclient/feed)WikiDiscussions master Synced today

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

NSQClient
=========

[](#nsqclient)

Yet another PHP client for [NSQ](http://nsq.io)

### Installation (via composer)

[](#installation-via-composer)

```
composer require moolex/nsqclient dev-master

```

### Usage

[](#usage)

#### Publish

[](#publish)

```
$topic = 'my_topic';
$endpoint = new \NSQClient\Access\Endpoint('http://127.0.0.1:4161');
$message = new \NSQClient\Message\Message('hello world');
$result = \NSQClient\Queue::publish($endpoint, $topic, $message);
```

#### Publish (deferred)

[](#publish-deferred)

```
$topic = 'my_topic';
$endpoint = new \NSQClient\Access\Endpoint('http://127.0.0.1:4161');
$message = (new \NSQClient\Message\Message('hello world'))->deferred(5);
$result = \NSQClient\Queue::publish($endpoint, $topic, $message);
```

#### Publish (batch)

[](#publish-batch)

```
$topic = 'my_topic';
$endpoint = new \NSQClient\Access\Endpoint('http://127.0.0.1:4161');
$message = \NSQClient\Message\Bag::generate(['msg data 1', 'msg data 2']);
$result = \NSQClient\Queue::publish($endpoint, $topic, $message);
```

#### Subscribe

[](#subscribe)

```
$topic = 'my_topic';
$channel = 'my_channel';
$endpoint = new \NSQClient\Access\Endpoint('http://127.0.0.1:4161');
\NSQClient\Queue::subscribe($endpoint, $topic, $channel, function (\NSQClient\Contract\Message $message) {
    echo 'GOT ', $message->id(), "\n";
    // make done
    $message->done();
    // make retry immediately
    // $message->retry();
    // make retry delayed in 10 seconds
    // $message->delay(10);
});
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance61

Regular maintenance activity

Popularity6

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

Top contributor holds 68% 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 ~337 days

Total

3

Last Release

249d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/49a467b16661ae3298d2fb2dbd1bd35b61657cefe85cac14816d2087554e3c7a?d=identicon)[wanganfu](/maintainers/wanganfu)

---

Top Contributors

[![moolex](https://avatars.githubusercontent.com/u/1132321?v=4)](https://github.com/moolex "moolex (17 commits)")[![wanganfu](https://avatars.githubusercontent.com/u/12389683?v=4)](https://github.com/wanganfu "wanganfu (6 commits)")[![xiezhenye](https://avatars.githubusercontent.com/u/2225688?v=4)](https://github.com/xiezhenye "xiezhenye (1 commits)")[![xxvholic](https://avatars.githubusercontent.com/u/5485134?v=4)](https://github.com/xxvholic "xxvholic (1 commits)")

---

Tags

nsq

### Embed Badge

![Health badge](/badges/annon-nsqclient/health.svg)

```
[![Health](https://phpackages.com/badges/annon-nsqclient/health.svg)](https://phpackages.com/packages/annon-nsqclient)
```

###  Alternatives

[symfony/lock

Creates and manages locks, a mechanism to provide exclusive access to a shared resource

514139.2M686](/packages/symfony-lock)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

564576.7k49](/packages/ecotone-ecotone)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k41](/packages/civicrm-civicrm-core)[illuminate/broadcasting

The Illuminate Broadcasting package.

7127.2M208](/packages/illuminate-broadcasting)[logiscape/mcp-sdk-php

Model Context Protocol SDK for PHP

368116.8k12](/packages/logiscape-mcp-sdk-php)

PHPackages © 2026

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