kcyeu / rabbitmq-worker-php
RabbitMQ worker as a daemon, which uses RedisCluster backend.
dev-master
2015-04-07 10:16 UTC
Requires
- kcyeu/php-redlock: dev-master
- shaneharter/php-daemon: dev-bugfix
- videlalvaro/php-amqplib: dev-master
This package is not auto-updated.
Last update: 2025-03-29 20:03:44 UTC
README
RabbitMQ-Worker
RabbitMQ-Worker as a daemon written in PHP.
RabbitMQ-Worker runs as a daemon. It consumes and digests messages from RabbitMQ then save result to RedisCluster, RedLock algorithm was adopted for distributed lock.
Table of Contents
Features
- Redis as data storage
- Shared memory lock which prevents duplicate instance
- Support signal
- Configurable worker count
Prerequisites
- PHP-Daemon
- PHP-Redlock
- php-amqplib
- (Optional) Composer
Getting Started
The easiest way to get started is to clone the repository:
git clone git@github.com:kcyeu/rabbitmq-worker.git
Then use composer to pull all dependencies:
composer install
That's it!
Usage
Remember to set credentials in src/config.ini
, then add -d
argument to run it in background:
php src/run.php [-d]
Changelog
1.0.0 (Mar 30, 2015)
- Debut
Tested Environment
- Ubuntu 14.04.2 LTS
- CentOS 6
Contributing
Pull requests are always welcome. Please open an issue before submitting a pull request.
License
==================================================
© 2015
Kuo-Cheng Yeu All rights reserved.