承接 grigorieff/yii2-amqp 相关项目开发

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

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

grigorieff/yii2-amqp

Composer 安装命令:

composer require grigorieff/yii2-amqp

包简介

Yii2 component for AMQP

README 文档

README

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist grigorieff/yii2-amqp "*"

or add

"grigorieff/yii2-amqp": "*"

to the require section of your composer.json.

Configuration

Add to your app config:

    'components' => [

        .........

        'amqp' => [
            'class' => grigorieff\amqp\Amqp,
            'host' => 'localhost',
            'port' => '5672',
            'user' => 'guest',
            'password' => 'guest'
        ],

        .........

    ];

Usage

// get AMQP component
$amqp = Yii::$app->amqp;

// declare exchange
$amqp->exchangeDeclare('myExchange','fanout');

// declare queue
$amqp->queueDeclare('myQueue');

// binding queue
$amqp->bindQueueExchange('myQueue','myExchange');

// basic publish message
$amqp->basicPublish($message, $exchange, $routingKey);


......

License

MIT

Requirements

This Yii2 component require PhpAmqpLib

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-09