PHPackages                             intreguei/gcp-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. intreguei/gcp-pubsub

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

intreguei/gcp-pubsub
====================

Pacote criado para publicação e subscrição de tópicos da gcp

v0.0.2(2y ago)01.8kMITPHP

Since Dec 11Pushed 2y agoCompare

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

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

PuSub as broadcast
==================

[](#pusub-as-broadcast)

This library offers a way to use the subscription of GCP pubsub as broadcast using the [google/cloud-pubsub](https://github.com/googleapis/google-cloud-php-pubsub) library.

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 library:

```
$ composer require intreguei/gcp-pubsub
```

### Authentication

[](#authentication)

This library use the [Google Cloud PHP](https://github.com/googleapis/google-cloud-php) authentication. See the [Authentication guide](https://github.com/googleapis/google-cloud-php/blob/main/AUTHENTICATION.md) for more information on authenticating your client. Once authenticated, you'll be ready to start making requests.

### Samples

[](#samples)

#### Publish message on topic:

[](#publish-message-on-topic)

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

use Intreguei\GcpPubsub\PubSub;

$callback = function ($message) {
    //method to use message from topic
}

PubSub::listenSubscription('your_topic_name', $callback);
```

#### Listen to subscription:

[](#listen-to-subscription)

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

use Intreguei\GcpPubsub\PubSub;

$dataToPublish = [
    'key_1' => 'data_1',
    'key_2' => 'data_2',
];

PubSub::publishMessage('your_topic_name', $dataToPublish);

}
```

### References

[](#references)

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

### Authors

[](#authors)

[Clezer Aragon](https://github.com/clezeraragon) &amp; [Leandro Lazari](https://github.com/lazari-br/)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

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

Total

2

Last Release

871d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d4cccc8fbd93a86f31d3e848f3b31a29c4421decef8af0abbeaa6d15083f66a?d=identicon)[lazari-br](/maintainers/lazari-br)

---

Top Contributors

[![lazari-br](https://avatars.githubusercontent.com/u/25181605?v=4)](https://github.com/lazari-br "lazari-br (1 commits)")

### Embed Badge

![Health badge](/badges/intreguei-gcp-pubsub/health.svg)

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

###  Alternatives

[friendsofsymfony/rest-bundle

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

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M292](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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