sweikenb / redis-mq-bundle
Simple REDIS based message queue
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:bundle
Requires
- predis/predis: ~0.8
- snc/redis-bundle: ~1.1
- symfony/symfony: >=2.3,<3.0
This package is auto-updated.
Last update: 2024-12-26 12:23:11 UTC
README
Simple REDIS based message queue.
Installation
Add the following dependency to your composer.json
file:
"require": { // ... "sweikenb/redis-mq-bundle": "~1.0" }
Active the bundle in your app/AppKernel.php
file:
$bundles = array( // ... new Sweikenb\Bundle\RedisMQBundle\SweikenbRedisMQBundle(), );
Configuration
As described in the example section, this bundle comes with an default service which uses the default_client connection of the snc redis bundle. If you wish to modify this, you simply can add you own service with an custom client:
<services> <service id="acme.custom.mq.client" class="%sweikenb_redis_mq.RedisMQService.class%"> <argument type="service" id="my.custom.snc.redisClient.here"/> </service> </services>
Example usage
You will finde two example commands in this bundle:
- sweikenb:redismq:example:write
- sweikenb:redismq:example:read
They will use the default redis client provided by the redis bundle (snc_redis.default_client
) and read/wirte some messages into the queue as long as you don't kill the commands (ctrl
+ c
).