PHPackages                             hhpack/publisher - 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. hhpack/publisher

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

hhpack/publisher
================

Simple implementation of Pub/Sub for Hack

1.3.0(7y ago)24902MITShell

Since Oct 18Pushed 7y agoCompare

[ Source](https://github.com/hhpack/publisher)[ Packagist](https://packagist.org/packages/hhpack/publisher)[ RSS](/packages/hhpack-publisher/feed)WikiDiscussions master Synced 1mo ago

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

publisher
=========

[](#publisher)

Simple implementation of Pub/Sub for Hack.

[![Latest Stable Version](https://camo.githubusercontent.com/a102d84b5f5e31a7e8496171cc9bcd46267a86c32e5202cf8e8f60f0fe6bda48/68747470733a2f2f706f7365722e707567782e6f72672f68687061636b2f7075626c69736865722f762f737461626c65)](https://packagist.org/packages/hhpack/publisher)[![CircleCI](https://camo.githubusercontent.com/13afa86f9ee979954aea21e4c26287d1c299b835c5347313c763490d56cda02f/68747470733a2f2f636972636c6563692e636f6d2f67682f68687061636b2f7075626c69736865722f747265652f6d61737465722e7376673f7374796c653d737667)](https://circleci.com/gh/hhpack/publisher/tree/master)[![Dependency Status](https://camo.githubusercontent.com/dde725d4cf9e538a84330f0f087d52486f38d08746fa7e04c1258507846607a9/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3536323234376362333664306162303031363030306231382f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/562247cb36d0ab0016000b18)[![License](https://camo.githubusercontent.com/56e9cd9f50d139a396aa56d446a5443a87a0f7aa5329268f12865ba03a17fb89/68747470733a2f2f706f7365722e707567782e6f72672f68687061636b2f7075626c69736865722f6c6963656e7365)](https://packagist.org/packages/hhpack/publisher)

Basic usage
-----------

[](#basic-usage)

Usage is very simple, You just implement **Message** the **Subscriber**.
The following are register to **MessagePublisher** and just publish a message.

```
namespace domain;

use HHPack\Publisher\Message;
use HHPack\Publisher\Subscribable;
use HHPack\Publisher\MessagePublisher;

final class DomainMessage implements Message
{
}

final class DomainMessageSubscriber implements Subscribable
{
  public async function onDomainMessage(DomainMessage $message) : Awaitable
  {
    await async_task1();
    await async_task2();
  }
}

$publisher = new MessagePublisher();
$publisher->registerSubscriber(new DomainMessageSubscriber());

await $publisher->publish(new DomainMessage());
```

Run the test
------------

[](#run-the-test)

You can run the test with the following command.

```
composer install
composer test

```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity72

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

Recently: every ~96 days

Total

17

Last Release

2591d ago

Major Versions

0.4.0 → 1.0.02017-01-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/70c299d6d6015ee714954aa05e4d0e9c7b1d31318a5d7db5e9bb4e1f70f78afc?d=identicon)[holyshared](/maintainers/holyshared)

---

Top Contributors

[![holyshared](https://avatars.githubusercontent.com/u/167190?v=4)](https://github.com/holyshared "holyshared (73 commits)")

---

Tags

eventhacklanghhvmpublisherhhvmhacksubscriberpubsubpublisher

### Embed Badge

![Health badge](/badges/hhpack-publisher/health.svg)

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

###  Alternatives

[petitpress/gps-messenger-bundle

Google Pub/Sub transport for Symfony Messenger

29491.0k3](/packages/petitpress-gps-messenger-bundle)

PHPackages © 2026

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