2017 © Pedro Peláez
 

package white-rabbit

WhiteRabbit - Simple Library to push/pull RabbitMQ in PHP with PHPAMQPLib PHP Version 5

image

disarli/white-rabbit

WhiteRabbit - Simple Library to push/pull RabbitMQ in PHP with PHPAMQPLib PHP Version 5

  • Thursday, March 8, 2018
  • by disarli
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

WhiteRabbit - RabbitMq on PHP using php-amqplib

WhiteRabbit Class - Simple Library to use RabbitMQ in PHP with PHPAMQPLib PHP Version 5, (*1)

Version

1.0.0, (*2)

Getting Started

These instructions will get you install the lib and running on your project for development and testing purposes., (*3)

Prerequisites

What things you need to install the software, (*4)

PHP 5.3, (*5)

Installing

Require via composer, (*6)

composer require disarli/white-rabbit

Install via composer, (*7)

composer install

On your project load the library, (*8)

use DiSarli\WhiteRabbit\WhiteRabbit;

Construct with your config data, (*9)

$config = [
    'host' => 'localhost',
    'port' => '5672',
    'user' => 'username',
    'pass' => 'pass',
    'vhost' => '/',
];
$rabbitmq = new WhiteRabbit($config);

Use your choosen method, (*10)

$rabbitmq->push('test_queue', $data, false, [], true);

Docs

The list bellow is quick help to primary methods, (*11)

Push

Push in the specified queue, (*12)

$this->rabbitmq->push('queue', $content, true, [], false);

@param string $queue - Queue
@param mixed (string/array) $data - Data
@param boolean $permanent - Permanent mode
@param array $params - Parameters
@param bool $output - Show output
@return bool

Pull

Get items from the specified queue, (*13)

$this->rabbitmq->pull('queue', true, []);

@param string $queue - Queue
@param bool $permanent - Permanent mode
@param array $callback - Callback
@return void

Versioning

I use SemVer for versioning., (*14)

Authors

  • Leonardo Di Sarli - Initial work - DiSarli

License

This project is licensed under the GNU GENERAL PUBLIC LICENSE - see the LICENSE.md file for details, (*15)

To do list

  • Better design patterns
  • Tests
  • Better docs
  • Error handling

The Versions

08/03 2018

dev-master

9999999-dev

WhiteRabbit - Simple Library to push/pull RabbitMQ in PHP with PHPAMQPLib PHP Version 5

  Sources   Download

GPL-3.0

The Requires

 

by Di Sarli