Download the PHP package assegaiphp/beanstalkd without Composer
On this page you can find all versions of the php package assegaiphp/beanstalkd. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download assegaiphp/beanstalkd
More information about assegaiphp/beanstalkd
Files in assegaiphp/beanstalkd
Package beanstalkd
Short Description Beanstalkd queue integration for AssegaiPHP framework, enabling job production and consumption using the Pheanstalk library.
License MIT
Informations about the package beanstalkd
Beanstalkd queue driver for AssegaiPHP applications.
AssegaiPHP Beanstalkd Queue Integration
This package adds Beanstalkd queue support to the AssegaiPHP framework using the Pheanstalk PHP client.
Contribution workflow
For commit and pull request conventions in this repo, see:
- docs/commit-and-pr-guidelines.md
๐ฆ Installation
Install via Composer:
`
Or use the Assegai CLI:
Compatibility
| Beanstalkd package | AssegaiPHP Common |
|---|---|
1.1.x |
^0.10.0 |
1.0.x |
^0.9.0 |
Applications moving to the AssegaiPHP 0.10 release line should upgrade this package and the coordinated first-party dependencies together.
โ๏ธ Configuration
Add a Beanstalk driver and connection to your config/queues.php file:
๐ก The format is:
'driverName.queueName', e.g.,'beanstalk.notifications'.
โจ Usage
Producing Jobs
Inject a queue instance in your service using #[InjectQueue]:
Consuming Jobs
Create a queue consumer class with #[Processor] and extend WorkerHost:
โ ๏ธ Do not use
#[Injectable]on consumers. Theprocess()method must accept acallableand return aQueueProcessResultInterface.
Running the Worker
Start the queue worker using:
This will continuously listen for jobs from the configured Beanstalk tube.
๐งช Testing
You can simulate jobs by calling the service from a controller or CLI command and watch the consumer terminal for output.
๐ Resources
Support
Assegai is an MIT-licensed open source project. It can grow thanks to sponsors and support by the amazing backers. If you'd like to join them, please read more here.
Stay in touch
- Author - Andrew Masiye
- Website - https://assegaiphp.com
- Twitter - @assegaiphp
License
Assegai is MIT licensed.
