2017 © Pedro Peláez
 

library nsq_to_swoole

a strong php client for NSQ using swoole extension

image

iris/nsq_to_swoole

a strong php client for NSQ using swoole extension

  • Tuesday, November 14, 2017
  • by iris-xie
  • Repository
  • 3 Watchers
  • 34 Stars
  • 4,136 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 4 Open issues
  • 10 Versions
  • 11 % Grown

The README.md

nsq_to_swoole

a strong php client for NSQ using swoole extension, (*1)

必要组件

  • PHP >= 5.5
  • Swoole >= 1.8.6

安装

pecl install swoole

composer require iris/nsq_to_swoole

发布

客户端支持NSQ服务器集群,同时支持单次多条消息发送, (*2)

$hosts = [
    ['host' => '192.168.9.135', 'port' => 4150],
];

$client = new Iris\NsqToSwoole\Client;
$client->setTarget($hosts, 1);

$client->pub('examples', 'Hello From iris-xie', 1);

订阅

首先通过lookup获取列表,然后才可以订阅, (*3)

$lookup = new Iris\NsqToSwoole\Lookup\Lookupd([
    ['host' => '192.168.9.135', 'port' => 4161],
]);

$client = new Iris\NsqToSwoole\Client;

$client->sub($lookup, 'examples', 'example', function($moniter, $msg) {
    echo sprintf("READ\t%s\t%s\n", $msg->getId(), $msg->getPayload());
});

使用示例

cd nsq_to_swoole/examples

Pub:, (*4)

php Pub.php

Sub:, (*5)

php Sub.php

The Versions

14/11 2017

dev-master

9999999-dev https://github.com/iris-xie

a strong php client for NSQ using swoole extension

  Sources   Download

MIT

The Requires

 

php client swoole socket nsq

14/11 2017

1.2.1

1.2.1.0 https://github.com/iris-xie

a strong php client for NSQ using swoole extension

  Sources   Download

MIT

The Requires

 

php client swoole socket nsq

14/11 2017

1.2.2

1.2.2.0 https://github.com/iris-xie

a strong php client for NSQ using swoole extension

  Sources   Download

MIT

The Requires

 

php client swoole socket nsq

13/11 2017

1.1.3

1.1.3.0 https://github.com/iris-xie

a strong php client for NSQ using swoole extension

  Sources   Download

MIT

The Requires

 

php client swoole socket nsq

13/11 2017

1.2.0

1.2.0.0 https://github.com/iris-xie

a strong php client for NSQ using swoole extension

  Sources   Download

MIT

The Requires

 

php client swoole socket nsq

10/11 2017

1.1.2

1.1.2.0 https://github.com/iris-xie

a strong php client for NSQ using swoole extension

  Sources   Download

MIT

The Requires

 

php client swoole socket nsq

10/11 2017

1.1.1

1.1.1.0 https://github.com/iris-xie

a strong php client for NSQ using swoole extension

  Sources   Download

MIT

The Requires

 

php client swoole socket nsq

10/11 2017

1.1.0

1.1.0.0 https://github.com/iris-xie

a strong php client for NSQ using swoole extension

  Sources   Download

MIT

The Requires

 

php client swoole socket nsq

19/10 2017

1.0.0

1.0.0.0 https://github.com/iris-xie

a strong php client for NSQ using swoole extension

  Sources   Download

MIT

The Requires

  • php >=5.5
  • ext-swoole >=1.8.6

 

php client swoole socket nsq

15/08 2017

dev-dev

dev-dev

client for NSQ with php-swoole

  Sources   Download

MIT

The Requires

  • php >=5.6
  • ext-swoole >=1.8.6