phootobr/rabbitmq-consumer

Consumer PHP for RabbitMQ

v1.0.1 2019-05-26 22:08 UTC

This package is auto-updated.

Last update: 2024-10-27 10:31:21 UTC


README

Latest Stable Version Total Downloads License composer.lock

This project is a consumer implementation for RabbitMQ from Phooto

Installation

composer create-project phootobr/rabbitmq-consumer

How to use

  1. After install add the .env file with the connection settings
  2. Add the code you want to execute upon receiving a RabbitMQ message in the app/Job.php file
  3. In the start.php file change the queue you want to listen on line 16: $consumer->init('YOUR_QUEUE');
  4. Run the script on the command line with PHP: php start.php
  5. (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.