PHPackages                             homer/yunba-push - 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. homer/yunba-push

ActiveLibrary

homer/yunba-push
================

Message pushing implementation with yunba as backend

1.0.0(10y ago)12.1k1proprietaryPHP

Since Mar 29Pushed 10y ago1 watchersCompare

[ Source](https://github.com/brianz82/yunba-push)[ Packagist](https://packagist.org/packages/homer/yunba-push)[ RSS](/packages/homer-yunba-push/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Yunba Push Service
==================

[](#yunba-push-service)

Use Restful APIs exposed by Yunba to implement message pushing service.

This service provides only the most basic features, and designated to be integrated into other project as infrastructure.

```
use Homer\Push\Yunba\Service as YunbaPushService;

$service = new YunbaPushService('appkey', 'secretkey');
// - or the full version
// $service = new YunbaPushService('appkey', 'secretkey', $optionsOfService, $instanceOfClient);

// push to topic
$service->pushToTopic('topic', 'message', $options);
$service->pushToTopicAsync('topic', 'message', $options);

// push to alias
$service->pushToAlias($alias_or_aliases, 'message', $options);

// check async topic message status
$service->checkAsyncTopicMessage('topic', 'message_id');
```

API
---

[](#api)

### construct

[](#construct)

`__construct($appKey, $secretKey, array $options = null, ClientInterface $client = null)`

- `$appKey` app key (from Yunba portal)
- `$secretKey` secret key (from Yunba portal)
- `$options` some configurations, including:
    - `url` (optional)yunba's url, default to ''
    - `alias_size` (optional) maximum #. of aliases in a batch. Yunba suggests that no more than 1000 aliases in a batch is preferred. default to `800`.
- $client http client

### push message to topic

[](#push-message-to-topic)

You can push a topic, and those who subscribed that topic will receive the message (it follows the publish/subscribe pattern). You can do that in either asynchrounous or synchrounous manner.

`pushToTopic($topic, $message, array $options = [])``pushToTopicAsync($topic, $message, array $options = [])`

- `$topic` topic to push message to
- `$message` message to push
- `$options` options for Yunba's 'publish' or 'publish\_async' method
- `return string` message id

Note: The message given will be pushed as a whole, even if it's an array. Call this method multiple times if you want to push multiple messages. For example, `pushToTopic($topic, ['message1', 'message2'])` won't push two messages to the topic, but one message with its content as '\["message1","message2"\]', which is just a plain JSON string.

### push message to alias

[](#push-message-to-alias)

This is how Yunba sends uni- and multi-cast messages(while pushing message to topic sends broadcast).

`pushToAlias($alias, $message, array $options = [])`

- `$alias` alias to push message to
- `$message` message to push
- `$options` options for Yunba's 'publish\_to\_alias' or 'publish\_to\_alias\_batch' method
- `return string|array` depending on whether you're pushing message to one or more aliases

### check async topic message

[](#check-async-topic-message)

Check status of messages that pushed via topic in async manner.

- `$topic` the topic
- `$messageId` id of the message being checked
- `return string` status of the message. Refer to Yunba's doc for detail.

### Reference

[](#reference)

[Yunba's Restful Quick Start](http://yunba.io/docs2/restful_Quick_Start)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

3695d ago

### Community

Maintainers

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

---

Top Contributors

[![brianz82](https://avatars.githubusercontent.com/u/17995689?v=4)](https://github.com/brianz82 "brianz82 (6 commits)")

### Embed Badge

![Health badge](/badges/homer-yunba-push/health.svg)

```
[![Health](https://phpackages.com/badges/homer-yunba-push/health.svg)](https://phpackages.com/packages/homer-yunba-push)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k20](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

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

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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