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.
- Redis as data storage
- Shared memory lock which prevents duplicate instance
- Support signal
- Configurable worker count
- PHP-Daemon
- PHP-Redlock
- php-amqplib
- (Optional) Composer
The easiest way to get started is to clone the repository:
git clone [email protected]:kcyeu/rabbitmq-worker.git
Then use composer to pull all dependencies:
composer install
That's it!
Remember to set credentials in src/config.ini
, then add -d
argument to run it in background:
php src/run.php [-d]
- Debut
- Ubuntu 14.04.2 LTS
- CentOS 6
Pull requests are always welcome. Please open an issue before submitting a pull request.
==================================================
© 2015
Kuo-Cheng Yeu All rights reserved.