2017 © Pedro Peláez
 

library php-pubsub-cmq

A Tencent CMQ adapter for the php-pubsub package.

image

takatost/php-pubsub-cmq

A Tencent CMQ adapter for the php-pubsub package.

  • Thursday, March 23, 2017
  • by takatost
  • Repository
  • 1 Watchers
  • 0 Stars
  • 572 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 3 % Grown

The README.md

php-pubsub-cmq

A Tencent CMQ adapter for the php-pubsub package., (*1)

Installation

composer require takatost/php-pubsub-cmq

Usage

$config = [
    'secret_key' => '',
    'secret_id'  => '',
    'queue_end_point'  => 'https://cmq-queue-sh.api.qcloud.com/v2/index.php',
    'topic_end_point'  => 'https://cmq-topic-sh.api.qcloud.com/v2/index.php',
    'options'    => [
        'debug'   => false,
        'timeout' => 10,
    ]
];

$adapter = new \Takatost\PubSub\CMQ\CMQPubSubAdapter($config);

// consume messages
// note: this is a blocking call
$adapter->subscribe('topic_queue_name', function ($message) {
    var_dump($message);
});

// publish messages
$adapter->publish('topic_name', 'HELLO WORLD');
$adapter->publish('topic_name', json_encode(['hello' => 'world']));
$adapter->publish('topic_name', 1);
$adapter->publish('topic_name', false);

The Versions

23/03 2017

dev-master

9999999-dev

A Tencent CMQ adapter for the php-pubsub package.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar takatost

23/03 2017

1.0.1

1.0.1.0

A Tencent CMQ adapter for the php-pubsub package.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar takatost

23/03 2017

1.0.0

1.0.0.0

A Tencent CMQ adapter for the php-pubsub package.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar takatost