How does mysql-php Message Queue work?

Source: Internet
Author: User
In this case, the order is successfully created and an SMS or email notification is sent to the user ,...... And so on, because the mail sending is slow and time-consuming, this causes the user to place orders slowly. You can use a message queue, but what is a queue? My understanding of the queue is as follows:

After the order is created successfully, an SMS or email notification is sent to the user ,...... And other operations,

Email sending is slow and time-consuming, which leads to slow user orders.

You can use a message queue, but what is a queue?

My understanding of the queue: There is a scheduled task that runs scripts regularly. The script will execute the unfinished tasks in the Message Queue (a table) and continue to run the tasks ......

Is that true?

But I will use php. I bought a virtual host. I don't know how to configure the server. Can I implement a queue?

Isn't it a program like DZ that just finishes uploading? Isn't it easy to configure the server? Is there a queue service like DZ, otherwise, how does its plug-ins complete services similar to queues?

I feel like learning PHP is quite simple, but I feel useless only when I do my project. It's just like I haven't uncovered its mysterious veil, thank you!

Reply content:

In this case:

After the order is created successfully, an SMS or email notification is sent to the user ,...... And other operations,

Email sending is slow and time-consuming, which leads to slow user orders.

You can use a message queue, but what is a queue?

My understanding of the queue: There is a scheduled task that runs scripts regularly. The script will execute the unfinished tasks in the Message Queue (a table) and continue to run the tasks ......

Is that true?

But I will use php. I bought a virtual host. I don't know how to configure the server. Can I implement a queue?

Isn't it a program like DZ that just finishes uploading? Isn't it easy to configure the server? Is there a queue service like DZ, otherwise, how does its plug-ins complete services similar to queues?

I feel like learning PHP is quite simple, but I feel useless only when I do my project. It's just like I haven't uncovered its mysterious veil, thank you!

Start a new service. Internal, used for sending emails. When a user creates an order, the order is created successfully,ProcessingThen, put the task to be sent to the queue. Such as databases.
A queue is a virtual concept.
Then, internal services are retrieved from the queue (for example, from the database .) Then, send the email and change the order status,Order placed successfully

Redis queue can be used

Well, that's what we did.

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.