2017 © Pedro Peláez
 

library cloud-pubsub

Cloud PubSub Client for PHP

image

google/cloud-pubsub

Cloud PubSub Client for PHP

  • Thursday, July 19, 2018
  • by bshaffer
  • Repository
  • 35 Watchers
  • 1 Stars
  • 98,835 Installations
  • PHP
  • 9 Dependents
  • 2 Suggesters
  • 3 Forks
  • 0 Open issues
  • 36 Versions
  • 38 % Grown

The README.md

Google Cloud PubSub for PHP

Idiomatic PHP client for Cloud Pub/Sub., (*1)

Latest Stable Version Packagist, (*2)

NOTE: This repository is part of Google Cloud PHP. Any support requests, bug reports, or development contributions should be directed to that project., (*3)

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

Installation

To begin, install the preferred dependency manager for PHP, Composer., (*5)

Now install this component:, (*6)

$ composer require google/cloud-pubsub

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., (*7)

Authentication

Please see our Authentication guide for more information on authenticating your client. Once authenticated, you'll be ready to start making requests., (*8)

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

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., (*9)

Please see the migration guide to upgrade from V1 of the library to V2., (*10)

Next Steps

  1. Understand the official documentation.
  2. Take a look at in-depth usage samples.

The Versions

19/07 2018
16/03 2018

v1.0.2

1.0.2.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

26/02 2018

v1.0.1

1.0.1.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

24/02 2018

v1.0.0

1.0.0.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

15/02 2018

v0.12.2

0.12.2.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

01/02 2018

v0.12.1

0.12.1.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

23/01 2018

v0.12.0

0.12.0.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

12/01 2018

v0.11.3

0.11.3.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

29/12 2017

v0.11.2

0.11.2.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

22/12 2017

v0.11.1

0.11.1.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

16/12 2017

v0.11.0

0.11.0.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

02/12 2017

v0.10.0

0.10.0.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

15/11 2017

v0.9.2

0.9.2.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

11/11 2017

v0.9.1

0.9.1.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

01/11 2017

v0.9.0

0.9.0.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

17/10 2017

v0.8.0

0.8.0.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

12/09 2017

v0.7.0

0.7.0.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

25/08 2017

v0.6.2

0.6.2.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

18/07 2017

v0.6.1

0.6.1.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

01/07 2017

v0.6.0

0.6.0.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

22/05 2017

v0.5.1

0.5.1.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

18/05 2017

v0.5.0

0.5.0.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

25/04 2017

v0.4.0

0.4.0.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

07/04 2017

v0.3.0

0.3.0.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

31/03 2017

v0.2.0

0.2.0.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires

 

10/03 2017

v0.1.0

0.1.0.0

Cloud PubSub Client for PHP

  Sources   Download

Apache-2.0

The Requires