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 today

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

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

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

924d 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

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.8k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M90](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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