PHPackages                             kovey/pulsar - 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. [Framework](/categories/framework)
4. /
5. kovey/pulsar

ActiveLibrary[Framework](/categories/framework)

kovey/pulsar
============

pulsar Of The Kovey Framework

v1.0.6(3y ago)06Apache-2.0PHPPHP &gt;=8.0

Since Jun 30Pushed 3y ago1 watchersCompare

[ Source](https://github.com/kovey/pulsar)[ Packagist](https://packagist.org/packages/kovey/pulsar)[ RSS](/packages/kovey-pulsar/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (7)Dependencies (3)Versions (8)Used By (0)

Pulsar Websocket Client With PHP
--------------------------------

[](#pulsar-websocket-client-with-php)

Description
-----------

[](#description)

### Library

[](#library)

### Usage:

[](#usage)

```
- composer require kovey/pulsar

```

### Examples

[](#examples)

```
    use Kovey\Pulsar\Client\Producer;
    use Kovey\Pulsar\Client\Comsumer;
    use Kovey\Pulsar\Message\Publish;
    use Kovey\Pulsar\Message\Acknowledge;
    use function Swoole\Coroutine\run;
    use Swoole\Timer;
    use Swoole\Coroutine;

    run(function () {
        $producer = new Producer('ws://127.0.0.1:8080');
        $producer->setTenant('tenant')
                 ->setNamespace('namespace')
                 ->setTopic('topic')
                 ->create();

        Timer::tick(5000, function (int $timerId, Producer $producer) {
            global $context;
            $context ++;
            $publish = new Publish();
            $publish->setPayload('hello')
                    ->setProperties(array('key' => 'value'))
                    ->setContext($context);

            $producer->send($publish);
            $result = $producer->recv();
            echo sprintf('response: %s', $result) . PHP_EOL;
            if ($result->isSuccess()) {
                echo 'send message success' . PHP_EOL;
                return;
            }

            echo sprintf('send message failure, error: %s', $result->getErrorMsg()) . PHP_EOL;
        }, $producer);

        go (fn () => comsume());
    });

    function comsume() : void
    {
        $comsumer = new Comsumer('ws://127.0.0.1:8080')
        $comsumer->setTenant('tenant')
                 ->setNamespace('namespace')
                 ->setTopic('topic')
                 ->setSubscription('subscription')
                 ->create();

        while (true) {
            $receive = $comsumer->recv();
            echo sprintf('receive data: %s', $receive) . PHP_EOL;
            if (!empty($receive->getMessageId())) {
                $ack = new Acknowledge();
                $comsumer->send($ack->setMessageId($receive->getMessageId()));
            }

            Coroutine::sleep(0.01);
        }
    }
```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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 ~5 days

Total

7

Last Release

1434d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7cdce3b265e73dc44351b4571c22d469be207dcc675093faaa58ca963922762c?d=identicon)[kovey](/maintainers/kovey)

---

Top Contributors

[![kovey](https://avatars.githubusercontent.com/u/2876473?v=4)](https://github.com/kovey "kovey (13 commits)")

---

Tags

phpframeworkpulsarkovey

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kovey-pulsar/health.svg)

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

PHPackages © 2026

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