PHPackages                             jiyis/laravel-nsq - 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. jiyis/laravel-nsq

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

jiyis/laravel-nsq
=================

Nsq driver for Laravel Queue

1.0.2(7y ago)84.0k4[1 issues](https://github.com/jiyis/laravel-nsq/issues)MITPHPPHP &gt;=7.0

Since May 23Pushed 7y ago4 watchersCompare

[ Source](https://github.com/jiyis/laravel-nsq)[ Packagist](https://packagist.org/packages/jiyis/laravel-nsq)[ RSS](/packages/jiyis-laravel-nsq/feed)WikiDiscussions master Synced yesterday

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

Laravel Nsq Client
------------------

[](#laravel-nsq-client)

NSQ client for laravel

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

[](#requirements)

DependencyRequirement[PHP](https://secure.php.net/manual/en/install.php)`>= 7.1.0`[Swoole](https://www.swoole.co.uk/)`The Newer The Better` `No longer support PHP5 since 2.0.12`Installation
------------

[](#installation)

```
pecl install swoole

```

```
composer require jiyis/laravel-nsq

```

Usage
-----

[](#usage)

#### Set env

[](#set-env)

```
NSQSD_URL=127.0.0.1:4150
NSQLOOKUP_URL=127.0.0.1:4161

# If it is multiple, please separate them with ","
NSQSD_URL=127.0.0.1:4150,127.0.0.1:4250

```

#### Create Job

[](#create-job)

```
php artisan make:job NsqTestJob

```

you need set two property. `public $topic;` `public $channel;`

```
class NsqTestJob  implements ShouldQueue
{

    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    public $topic = 'test';

    public $channel = 'web';

    public function handle()
    {
        $client = $this->job->getCurrentClient();
        $payload = json_decode($this->job->getMessage(), true);
        ...
    }
}
```

#### Publish

[](#publish)

```
// the data you want to be publish
$str = [
    'message' => 'this is a message',
    'user_id' => 1
];
// not supported dispatch
Queue::connection('nsq')->push(new NsqTestJob, $str);
```

#### Subscribe

[](#subscribe)

```
php artisan queue:work nsq --sleep=3 --tries=3 --timeout=500  --job=App\\Jobs\\NsqTestJob

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~35 days

Total

3

Last Release

2841d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a295c1ecacdccc9c34f470de0900fbaca4f32ae86510be49094431b9609b7930?d=identicon)[jiyis](/maintainers/jiyis)

---

Top Contributors

[![jiyis](https://avatars.githubusercontent.com/u/8382195?v=4)](https://github.com/jiyis "jiyis (2 commits)")

---

Tags

laravelnsqnsqlaravelnsqphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jiyis-laravel-nsq/health.svg)

```
[![Health](https://phpackages.com/badges/jiyis-laravel-nsq/health.svg)](https://phpackages.com/packages/jiyis-laravel-nsq)
```

###  Alternatives

[illuminate/queue

The Illuminate Queue package.

20331.4M1.2k](/packages/illuminate-queue)[palpalani/laravel-sqs-queue-json-reader

Custom SQS queue reader for Laravel

26109.8k](/packages/palpalani-laravel-sqs-queue-json-reader)[rapidez/core

Rapidez Core

1820.7k53](/packages/rapidez-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[aplr/kafkaesk

Laravel Kafka queue driver

102.1k](/packages/aplr-kafkaesk)

PHPackages © 2026

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