Download the PHP package uecode/qpush-bundle without Composer
On this page you can find all versions of the php package uecode/qpush-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package qpush-bundle
QPush - Symfony2 Push Queue Bundle
Overview
This bundle allows you to easily consume messages from Push Queues by simply tagging your services and relying on Symfony's event dispatcher - without needing to run a daemon or background process to continuously poll your queue.
Full Documentation: qpush-bundle.readthedocs.org
Installation
The bundle should be installed through composer.
Update AppKernel.php of your Symfony Application
Add the UecodeQPushBundle
to your kernel bootstrap sequence, in the $bundles
array.
Basic Configuration:
Here is a basic configuration that would create a push queue called
my_queue_name
using AWS or IronMQ. You can read about the supported providers
and provider options in the full documentation.
Example
You may exclude aws key and secret to default to IAM role on the EC2 machine.
Publishing messages to your Queue
Publishing messages is simple - fetch the registered Provider service from the
container and call the publish
method on the respective queue.
This bundle stores your messages as a json object and the publish method expects an array, typically associative.
Example
Working with messages from your Queue
When a message hits your application, this bundle will dispatch a MessageEvent
which can be handled by your services. You need to tag your services to handle
these events.
Example
Example
The Message
objects contain the provider specific message id, a message body,
and a collection of provider specific metadata.
These properties are accessible through simple getters from the message object.
Example
Cleaning up the Queue
Once all other Event Listeners have been invoked on a MessageEvent
, the Bundle
will automatically attempt to remove the Message from your Queue for you.
All versions of qpush-bundle with dependencies
doctrine/common Version ~2.4
symfony/dependency-injection Version ~2.3|^3.0|^4.0
symfony/config Version ~2.3|^3.0|^4.0
symfony/http-kernel Version ~2.3|^3.0|^4.0
symfony/console Version ~2.3|^3.0|^4.0
symfony/monolog-bundle Version ~2.3|^3.0|^4.0