dataprocessors/amqp-async 问题修复 & 功能扩展

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

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

dataprocessors/amqp-async

最新稳定版本:v1.0.10

Composer 安装命令:

composer require dataprocessors/amqp-async

包简介

Async AMQP 0.9.1 client for PHP designed to work with Icicle.

README 文档

README

Build Status LGPL-2.1 License

amqp-async is an implementation of the AMQP 0.9.1 protocol for PHP designed to work with Icicle.

Potentially supporting Amp in the future.

Requirements
  • PHP 7.0+
Installation

The recommended way to install amqp-async is with the Composer package manager. (See the Composer installation guide for information on installing and using Composer.)

Run the following command to use the library in your project:

composer require dataprocessors/amqp-async

You can also manually edit composer.json to add amqp-async as a project requirement.

// composer.json
{
    "require": {
        "dataprocessors/amqp-async": "1.0.*"
    }
}

Example

<?php
require_once "vendor/autoload.php";

class Demo {

  public function go() {
    $conn = new DataProcessors\AMQP\AMQPConnection();
    yield $conn->connect('127.0.0.1', 5672, 'guest', 'guest');
    $channel = yield $conn->channel();
    yield $channel->basic_consume('test', '', false, false, false, false,
      function($msg) {
        echo "Got a message\n";
      }
    );
  }

}

$demo = new Demo();
$coroutine = new Icicle\Coroutine\Coroutine($demo->go());
Icicle\Loop\run();

Credits

amqp-async is based on php-amqplib

统计信息

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

GitHub 信息

  • Stars: 13
  • Watchers: 4
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-2.1
  • 更新时间: 2015-10-22