PHP RABBITMQ Use
Reference URL:
Http://www.rabbitmq.com/tutorials/tutorial-three-php.html
Take a subscription as an example:
1. First, your environment (native WINDOWS,XAMPP), need to install the php-amqplib extension,
Here is a description: php-amqplib, the extension is x86, whether your win system is 32-bit or 64-bit, his extension is x86, otherwise the installation fails.
It again: Your machine is installing composer software.
2. New directory on E-disk: E:\RABBITMQ
Then open this address: https://github.com/php-amqplib/php-amqplib
Find Composer.json This file, copy it to your: E:\RABBITMQ directory,
Execute composer Install
3. Download the Https://github.com/php-amqplib/php-amqplib address of the package, and put it in your RABBITMQ directory
4. Create a new 2 file send.php/receive.php
Write emit_log.php content to send.php
emit_log.php content copied to receive.php
5. Run:
CMD->php send.php
cmd->php receive.php
cmd->php receive.php
Open 3 cmd altogether
PHP RABBITMQ Use