symfony BBITSqsCommandQueueBundle

Installs: 2 672

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 1

Forks: 0

Open Issues: 3


v1.0 2015-10-21 09:57 UTC

This package is not auto-updated.

Last update: 2020-07-10 19:16:35 UTC


Latest Stable Version

SqsCommandQueueBundle is a simple bundle, wich you can use, to queue commands on amazon SQS. This bundle then provides a worker, wich can be run on several servers, and will execute the commands, on one of the several workers.

Step 1: Download BBITSqsCommandQueueBundle using composer

Add BBITSqsCommandQueueBundle in your composer.json:

    "require": {
        "bbit/sqs-command-queue-bundle": "dev-master",

Now tell composer to download the bundle by running the command:

$ php composer.phar update bbit/sqs-command-queue-bundlee

Composer will install the bundle to your project's vendor/BBIT directory.

Step 2: Enable the bundle

Enable the bundle in the kernel:

// app/AppKernel.php

public function registerBundles()
    $bundles = array(
        // ...
        new BBIT\SqsCommandQueueBundle\BBITSqsCommandQueueBundle(),

Step 3: Configure the bundle

    aws_sqs_key: xxx
    aws_sqs_secret: xxxxxxxxx
    aws_sqs_region: eu-central-1


Send a command to the queue:

$container->get('sqs_queue')->addCommand('app/console cache:clear');

The worker:

app/console bbit:sqs-command-queue:work 

More BBIT Bundles:

AsyncDispatcherBundle is a simple bundle which provides you with an async event dispatcher, which will store events untill kernel.terminate, and then fire them using the regular event dispatcher. Latest Stable Version