Steps you have to take to use the PHP AMQP extension to publish messages and to consume messages.
- Installing
You have to install RabbitMQ Installation and the PHP AMQP library Installation.
- Using the demo files (assume we saved the files into a folder named
workers
)
Browser:
http://localhost/workers/publisher.php
http://localhost/workers/consumer.php
CLI:
/var/www/workers/>>>php publisher.php
/var/www/workers/>>>php consumer.php