承接 amplifier/yii-amqp 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

amplifier/yii-amqp

最新稳定版本:v3.0.0

Composer 安装命令:

composer require amplifier/yii-amqp

包简介

AMQP adapter for Yii

README 文档

README

YiiAMQP is a fully functional AMQP producer and conusumer Yii application component.

##Requirements

Tested with Yii version 1.1.13

##Quick Start

Install via composer, then configure your application to use this component by adding and updating to match your needs the following configuration

'components' => array(
        'mq' => array(
            'class' => 'YiiAMQP\Client',
            'connection' => array(
                'host' => 'localhost',
                'port' => '5672',
                'vhost' => '/',
                'user' => 'guest',
                'password' => 'guest'
            )
        ),

##Usage

Producer

$myMessage = array('greeting' => 'Hello World');
Yii::app()->mq->exchanges->greeter->send($myMessage); // will be JSON encoded

Consumer

Initialise the component

Yii::app()->mq->defaultQueue->consume(function($message){ print_r($message); });
Yii::app()->mq->queues->myQueue->consume(function($message){ print_r($message); });
Yii::app()->mq->wait(); // wait for results

##Contributing Please submit all pull requests against *-wip branches. Thanks!

##Bug tracker If you find any bugs, please create an issue at https://github.com/mteichtahl/YiiAMQP/issues

##Credits

##License

MIT.

统计信息

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

GitHub 信息

  • Stars: 22
  • Watchers: 8
  • Forks: 17
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-06-26