phootobr / rabbitmq-consumer
Consumer PHP for RabbitMQ
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^7.2
- php-amqplib/php-amqplib: ^2.9
- symfony/dotenv: ^4.2
This package is auto-updated.
Last update: 2024-10-27 10:31:21 UTC
README
This project is a consumer implementation for RabbitMQ from Phooto
Installation
composer create-project phootobr/rabbitmq-consumer
How to use
- After install add the
.env
file with the connection settings - Add the code you want to execute upon receiving a RabbitMQ message in the
app/Job.php
file - In the
start.php
file change the queue you want to listen on line 16:$consumer->init('YOUR_QUEUE');
- Run the script on the command line with PHP:
php start.php
- (optional) Configure the supervisord to keep your script running in the background using the
app-consumer-supervisor.conf
file as an example
License
This project is open-sourced software licensed under the MIT license.