PHPackages                             triwinvendor/google-pubsub - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. triwinvendor/google-pubsub

ActiveLibrary[HTTP &amp; Networking](/categories/http)

triwinvendor/google-pubsub
==========================

Cloud PubSub Client for PHP

1.0.0(3y ago)04Apache-2.0PHP

Since Oct 13Pushed 3y agoCompare

[ Source](https://github.com/TriwinVendor/google-pubsub)[ Packagist](https://packagist.org/packages/triwinvendor/google-pubsub)[ RSS](/packages/triwinvendor-google-pubsub/feed)WikiDiscussions main Synced 1mo ago

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

Google Cloud PubSub for PHP
===========================

[](#google-cloud-pubsub-for-php)

> Idiomatic PHP client for [Cloud Pub/Sub](https://cloud.google.com/pubsub/).

[![Latest Stable Version](https://camo.githubusercontent.com/8de8e2f0eb19ab3137d3fe89bb90ac260d466bd8ad48256d21e57a718a66e315/68747470733a2f2f706f7365722e707567782e6f72672f676f6f676c652f636c6f75642d7075627375622f762f737461626c65)](https://packagist.org/packages/google/cloud-pubsub) [![Packagist](https://camo.githubusercontent.com/f35877b865fed3ce13eee55c2284d1238657ada78cbe9f120e33f8c76104017c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f676f6f676c652f636c6f75642d7075627375622e737667)](https://packagist.org/packages/google/cloud-pubsub)

- [API documentation](http://googleapis.github.io/google-cloud-php/#/docs/cloud-pubsub/latest)

**NOTE:** This repository is part of [Google Cloud PHP](https://github.com/googleapis/google-cloud-php). Any support requests, bug reports, or development contributions should be directed to that project.

A fully-managed real-time messaging service that allows you to send and receive messages between independent applications.

### Installation

[](#installation)

To begin, install the preferred dependency manager for PHP, [Composer](https://getcomposer.org/).

Now to install just this component:

```
$ composer require google/cloud-pubsub
```

Or to install the entire suite of components at once:

```
$ composer require google/cloud
```

This component supports both REST over HTTP/1.1 and gRPC. In order to take advantage of the benefits offered by gRPC (such as streaming methods) please see our [gRPC installation guide](https://cloud.google.com/php/grpc).

### Authentication

[](#authentication)

Please see our [Authentication guide](https://github.com/googleapis/google-cloud-php/blob/master/AUTHENTICATION.md) for more information on authenticating your client. Once authenticated, you'll be ready to start making requests.

### Sample

[](#sample)

```
require 'vendor/autoload.php';

use Google\Cloud\PubSub\PubSubClient;

$pubSub = new PubSubClient();

// Get an instance of a previously created topic.
$topic = $pubSub->topic('my_topic');

// Publish a message to the topic.
$topic->publish([
    'data' => 'My new message.',
    'attributes' => [
        'location' => 'Detroit'
    ]
]);

// Get an instance of a previously created subscription.
$subscription = $pubSub->subscription('my_subscription');

// Pull all available messages.
$messages = $subscription->pull();

foreach ($messages as $message) {
    echo $message->data() . "\n";
    echo $message->attribute('location');
}
```

### Version

[](#version)

This component is considered GA (generally available). As such, it will not introduce backwards-incompatible changes in any minor or patch releases. We will address issues and requests with the highest priority.

### Next Steps

[](#next-steps)

1. Understand the [official documentation](https://cloud.google.com/pubsub/docs/).
2. Take a look at [in-depth usage samples](https://github.com/GoogleCloudPlatform/php-docs-samples/tree/master/pubsub/).

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

1304d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/80bd3956c4cc9bc2e115d3ad0f7cb8c548541969ccb16bd3082feec1cf56e756?d=identicon)[yu](/maintainers/yu)

---

Top Contributors

[![QAQsugar](https://avatars.githubusercontent.com/u/36018735?v=4)](https://github.com/QAQsugar "QAQsugar (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/triwinvendor-google-pubsub/health.svg)

```
[![Health](https://phpackages.com/badges/triwinvendor-google-pubsub/health.svg)](https://phpackages.com/packages/triwinvendor-google-pubsub)
```

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M315](/packages/friendsofsymfony-rest-bundle)[google/cloud-translate

Cloud Translation Client for PHP

20215.9M84](/packages/google-cloud-translate)[google/cloud-pubsub

Cloud PubSub Client for PHP

9017.1M63](/packages/google-cloud-pubsub)[geocoder-php/common-http

Common files for HTTP based Geocoders

18722.1M64](/packages/geocoder-php-common-http)[illuminate/http

The Illuminate Http package.

11936.0M5.0k](/packages/illuminate-http)[google/cloud-vision

Cloud Vision Client for PHP

1075.2M24](/packages/google-cloud-vision)

PHPackages © 2026

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