cawaphp/queue

This package is abandoned and no longer maintained. No replacement package was suggested.

Сáша Queue

dev-master 2018-02-19 12:26 UTC

This package is not auto-updated.

Last update: 2023-12-23 15:38:32 UTC


README

Warning

Be aware that this package is still in heavy developpement. Some breaking change will occure. Thank's for your comprehension.

Features

  • Drivers
    • Amqp
    • Redis

Basic Usage

use Cawa\Queue\Envelope;
use \Cawa\Queue\QueueFactory;

class Example
{
    use QueueFactory;

    public function consume()
    {
        $queue = self::queue();

        $queue->consume(function (callable $quit, Envelope $envelope = null) {
            if ($envelope) {
                trace($envelope);
            }
            return true;
        });
    }
    
    public function publish()
    {
        $queue = self::queue();
        $queue->publish(new Envelope('publish'));
    }
}

About

License

Cawa is licensed under the GPL v3 License - see the LICENSE file for details