2017 © Pedro Peláez
 

yii-extension yii2-amqp

Yii2 component for AMQP

image

grigorieff/yii2-amqp

Yii2 component for AMQP

  • Sunday, August 9, 2015
  • by grigorieff
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Yii2 AMQP

Installation

The preferred way to install this extension is through composer., (*1)

Either run, (*2)

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

or add, (*3)

"grigorieff/yii2-amqp": "*"

to the require section of your composer.json., (*4)

Configuration

Add to your app config:, (*5)

    '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, (*6)

Requirements

This Yii2 component require [PhpAmqpLib][1], (*7)

The Versions

09/08 2015

dev-master

9999999-dev

Yii2 component for AMQP

  Sources   Download

MIT

The Requires

 

by Mike Grigorieff

extension rabbitmq yii amqp