5ichong/umq-sdk

dev-master 2017-04-06 11:43 UTC

README

Installation

To install Validator, simply:

$ composer require 5ichong/umq-sdk

For latest commit version:

$ composer require 5ichong/umq-sdk @dev

Requirements

Validator works with 7.0, 7.1.

Quick Start and Examples

require __DIR__ . '/vendor/autoload.php';

use \Aichong\Producer;
use \Aichong\Consumer;

$producer = new Producer('', '', '', '');

$producer->publish('phpunit', 'test');

$consumer = new Consumer('', '', '', '');

$list = $consumer->get('phpunit', 20);

$messagesId = [];

foreach ($list->messages as $val) {

    $messagesId[] = $val->messageID;
}

$consumer->ack('phpunit', $messagesId)