All Projects → symfony-bundles → queue-bundle

symfony-bundles / queue-bundle

Licence: MIT license
Symfony Queue Bundle

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to queue-bundle

orange
基于beanstalkd实现多进程处理消息队列的框架
Stars: ✭ 19 (-38.71%)
Mutual labels:  queue
asynctimerqueue
Asynchronous timer queue mechanism(C++11)
Stars: ✭ 21 (-32.26%)
Mutual labels:  queue
needle
📌📚 An extensive standalone data structure library for JavaScript.
Stars: ✭ 25 (-19.35%)
Mutual labels:  queue
gostalkd
sjis.me
Stars: ✭ 18 (-41.94%)
Mutual labels:  queue
js-symbol-tree
Turn any collection of objects into its own efficient tree or linked list using Symbol
Stars: ✭ 86 (+177.42%)
Mutual labels:  queue
firebase-bundle
A Symfony Bundle for the Firebase PHP Admin SDK
Stars: ✭ 112 (+261.29%)
Mutual labels:  symfony-bundle
linked-blocking-multi-queue
A concurrent collection that extends the existing Java concurrent collection library, offering an optionally-bounded blocking "multi-queue" based on linked nodes.
Stars: ✭ 41 (+32.26%)
Mutual labels:  queue
phpfastcache-bundle
The symfony 3/Flex bundle for PhpFastCache integrating a phpfastcache service, a twig cache tag and a powerfull cache profiler integrated to the symfony profile
Stars: ✭ 19 (-38.71%)
Mutual labels:  symfony-bundle
async
async is a tiny C++ header-only high-performance library for async calls handled by a thread-pool, which is built on top of an unbounded MPMC lock-free queue.
Stars: ✭ 25 (-19.35%)
Mutual labels:  queue
RabbitMQTools
PowerShell module containing cmdlets to manage RabbitMQ.
Stars: ✭ 27 (-12.9%)
Mutual labels:  queue
LiipSoapRecorderBundle
[DEPRECATED] Recorder/Player for SOAP communications
Stars: ✭ 12 (-61.29%)
Mutual labels:  symfony-bundle
breadcrumb-bundle
Symfony bundle for easy breadcrumbs management
Stars: ✭ 26 (-16.13%)
Mutual labels:  symfony-bundle
tasq
A simple task queue implementation to enqeue jobs on local or remote processes.
Stars: ✭ 83 (+167.74%)
Mutual labels:  queue
Harbol
Harbol is a collection of data structure and miscellaneous libraries, similar in nature to C++'s Boost, STL, and GNOME's GLib
Stars: ✭ 18 (-41.94%)
Mutual labels:  queue
filequeue
light weight, high performance, simple, reliable and persistent queue for Java applications
Stars: ✭ 35 (+12.9%)
Mutual labels:  queue
CmsBundle
Super-lightweight CMS bundle for Symfony
Stars: ✭ 52 (+67.74%)
Mutual labels:  symfony-bundle
awsBundle
Symfony AWS Bundle (supports Symfony 2, 3 and 4)
Stars: ✭ 18 (-41.94%)
Mutual labels:  symfony-bundle
facade-bundle
Support Facades for Symfony service
Stars: ✭ 17 (-45.16%)
Mutual labels:  symfony-bundle
socketio
No description or website provided.
Stars: ✭ 23 (-25.81%)
Mutual labels:  symfony-bundle
BeelabTagBundle
🏷 A simple implementation of tags for Symfony and Doctrine ORM
Stars: ✭ 45 (+45.16%)
Mutual labels:  symfony-bundle

SymfonyBundlesQueueBundle

SensioLabsInsight

Build Status Scrutinizer Code Quality Code Coverage Total Downloads Latest Stable Version License

Installation

  • Require the bundle with composer:
composer require symfony-bundles/queue-bundle
  • Enable the bundle in the kernel:
public function registerBundles()
{
    $bundles = [
        // ...
        new SymfonyBundles\QueueBundle\SymfonyBundlesQueueBundle(),
        // ...
    ];
    ...
}
  • Configure the queue bundle in your config.yml.

Defaults configuration:

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

How to use

A simple example of the use of the queue:

$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
// now, we can get the data at any time in the queue order

// 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

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');

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

// adding data to default queue
$queue->setName('queue:default');
$queue->push('To be or not to be');
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].