Examples and work demonstrating.
Example of sending messages to a queue: produce.php
Example of processing messages from a queue: consume.php
Advanced example of processing messages from a queue: advanced-consume.php
cd .docker - go to dir.
Run the following commands:
make build- build docker containermake start- start docker containermake php cmd='./example/consume.php'- run consume (to read messages from the queue)make php cmd='./example/produce.php'- run produce (to sent messages to the queue)
Both examples should work in different tabs because they are daemons (while(true){}).
PHP command access:
make php cmd='{you_command}':- Example:
make php cmd='-v':
Composer command access:
make composer cmd='{you_command}':- Example: -
make composer cmd='update':