corley/queue-array

1.0.0 2017-01-21 12:43 UTC

This package is not auto-updated.

Last update: 2024-10-27 01:32:17 UTC


README

To use this package you need Corley\Queue\Queue

Build Status

composer require corley/queue:~1

Use as adapter

use Corley\Queue\Queue;
use Corley\Queue\ArrayAdapter\ArrayAdapter;

$adapter = new ArrayAdapter();

$queue = new Queue("example", $adapter);
$queue->send(json_encode(["test" => "ok"]));

list($receipt, $message) = $queue->receive();
$message = json_decode($message, true);

$queue->delete($receipt);