Array Queue

Centum\Queue\ArrayQueue is an in-memory queue implementation that is not persistent. This makes it ideal for testing and development.

Constructor

Centum\Queue\ArrayQueue(
    Centum\Interfaces\Queue\TaskRunnerInterface $taskRunner
);

Features

As this is designed for testing and development, it also providers the getters getTasks() and getBuriedTasks() so that you can inspect the contents of the queue.

If you call the consume() method when the Queue is empty, NoTasksInQueueException will be thrown. This differs from BeanstalkdQueue which will wait until a Beanstalkd job is created.