Download the PHP package ronanchilvers/silex-queue-beanstalkd without Composer
On this page you can find all versions of the php package ronanchilvers/silex-queue-beanstalkd. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ronanchilvers/silex-queue-beanstalkd
More information about ronanchilvers/silex-queue-beanstalkd
Files in ronanchilvers/silex-queue-beanstalkd
Package silex-queue-beanstalkd
Short Description Simple queue mechanism for silex using beanstalkd
License MIT
Informations about the package silex-queue-beanstalkd
Simple queue for silex
This is a simple queue mechanism for Silex using Beanstalkd as the backend.
Installation
Installation using composer:
We're assuming that you have an accessible Beanstalkd instance running somewhere and that you know its network address.
Configuration
To use the queue service you need to register the provider like so:
By default this assumes that Beanstalkd is running on the default port (11300) on localhost.
There are a few configuration directives that you can use to get the queue service working. You can pass these in using the normal Silex way like this:
The available configuration keys are:
- host : Beanstalkd host (default localhost)
- port : Beanstalkd port (default 11300)
- timeout : Timeout for Beanstalkd connection (default 2 seconds). This option is passed directly through to Pheanstalk.
- persistent : Use a persistent connection to Beanstalkd or not (default false). This option is passed directly through to Pheanstalk.
- default.queue : default queue to push / pull to / from. The queue can be overridden at publish / consume time.
-
max.iterations : maximum iterations a worker does when using the queue:consume CLI command before exiting
Consume Command
A simple consume command for use with is provided. The command requires the package as it needs access to the Application object. To use it you can do something like this:
which will add a queue:consume command to the console application.