2017 © Pedro Peláez
 

symfony-bundle queue-bundle

Symfony Queue Bundle

image

symfony-bundles/queue-bundle

Symfony Queue Bundle

  • Wednesday, October 18, 2017
  • by khaperets
  • Repository
  • 8 Watchers
  • 26 Stars
  • 11,012 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 8 Versions
  • 18 % Grown

The README.md

SymfonyBundlesQueueBundle

SensioLabsInsight, (*1)

![Build Status][testing-image] [Scrutinizer Code Quality][scrutinizer-code-quality-link] [Code Coverage][code-coverage-link] Total Downloads Latest Stable Version License, (*2)

Installation

  • Require the bundle with composer:

``` bash composer require symfony-bundles/queue-bundle, (*3)


* Enable the bundle in the kernel: ``` php public function registerBundles() { $bundles = [ // ... new SymfonyBundles\QueueBundle\SymfonyBundlesQueueBundle(), // ... ]; ... }
  • Configure the queue bundle in your config.yml.

Defaults configuration: ``` yml sb_queue: service: alias: 'queue' # alias for service sb_queue (e.g. $this->get('queue')) class: 'SymfonyBundles\QueueBundle\Service\Queue' storage: 'redis' # storage key from queue.storages section settings: queue_default_name: 'queue:default' # default name for queue storages: redis: class: 'SymfonyBundles\QueueBundle\Service\Storage\RedisStorage' client: 'sb_redis.client.default' # storage client service id, (*4)


* Configure the redis client in your config.yml. Read more about [RedisBundle configuration][redis-bundle-link]. How to use ---------- A simple example of the use of the queue: ``` php $queue = $this->get('sb_queue'); // get the service // or use: $this->get('queue'); the `queue` service use as alias, // which setting in config.yml in parameter `sb_queue.service.alias` // adding some data to queue $queue->push('User "demo" registered'); $queue->push(1234567890); $queue->push(new \stdClass); // get count of items from queue $queue->count(); // returns integer: 3

``` php // now, we can get the data at any time in the queue order, (*5)

// get data from queue $queue->pop(); // returns string: User "demo" registered $queue->count(); // returns integer: 2 $queue->pop(); // returns integer: 1234567890 $queue->count(); // returns integer: 1 $queue->pop(); // returns object: object(stdClass) $queue->count(); // returns integer: 0, (*6)


If you want to change the queue:

// adding data to queue notifications $queue->setName('application:notifications'); $queue->push('You have a new message from Jessica');, (*7)

// adding data to queue settings $queue->setName('account:settings'); $queue->push('User with ID 123 changed password');, (*8)

// adding data to default queue $queue->setName('queue:default'); $queue->push('To be or not to be'); ```, (*9)

The Versions

18/10 2017

dev-master

9999999-dev https://github.com/symfony-bundles/queue-bundle

Symfony Queue Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dmitry Khaperets

redis bundle symfony queue fifo

18/10 2017

2.0.x-dev

2.0.9999999.9999999-dev https://github.com/symfony-bundles/queue-bundle

Symfony Queue Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dmitry Khaperets

redis bundle symfony queue fifo

18/10 2017

v2.0.0

2.0.0.0 https://github.com/symfony-bundles/queue-bundle

Symfony Queue Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dmitry Khaperets

redis bundle symfony queue fifo

02/06 2016

dev-dev

dev-dev https://github.com/symfony-bundles/queue-bundle

Symfony Queue Bundle

  Sources   Download

MIT

The Requires

 

by Dmitry Khaperets

redis bundle symfony queue fifo

02/06 2016

v1.0.3

1.0.3.0 https://github.com/symfony-bundles/queue-bundle

Symfony Queue Bundle

  Sources   Download

MIT

The Requires

 

by Dmitry Khaperets

redis bundle symfony queue fifo

27/05 2016

v1.0.2

1.0.2.0 https://github.com/symfony-bundles/queue-bundle

Symfony Queue Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dmitry Khaperets

redis bundle symfony queue fifo

22/05 2016

v1.0.1

1.0.1.0

Symfony: Queue Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dmitry Khaperets

redis bundle symfony queue

21/05 2016

v1.0.0

1.0.0.0

Symfony: Queue Bundle

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dmitry Khaperets

redis bundle symfony queue