PHP RABBITMQ Use

Source: Internet
Author: User
Tags composer install rabbitmq

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.