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.