intreguei/gcp-pubsub 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

intreguei/gcp-pubsub

最新稳定版本:v0.0.2

Composer 安装命令:

composer require intreguei/gcp-pubsub

包简介

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

README 文档

README

This library offers a way to use the subscription of GCP pubsub as broadcast using the google/cloud-pubsub library.

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

Installation

To begin, install the preferred dependency manager for PHP, Composer.

Now to install just this library:

$ composer require intreguei/gcp-pubsub

Authentication

This library use the Google Cloud PHP authentication. See the Authentication guide for more information on authenticating your client. Once authenticated, you'll be ready to start making requests.

Samples

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:

require 'vendor/autoload.php';

use Intreguei\GcpPubsub\PubSub;

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

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

}

References

  1. Google CLoud official documentation.
  2. Take a look at Google Cloud in-depth usage samples.

Authors

Clezer Aragon & Leandro Lazari

统计信息

  • 总下载量: 1.79k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固