Information Publishing and queue usage Problems

Source: Internet
Author: User
Generally, when we publish a message, it will be directly written to the database, but for highly concurrent platforms, we will use the queue to store the published information in the queue, then the queue process is used to complete the warehouse receiving operation. When publishing information, we will have a series of prompts, such as incorrect data format ,...

Generally, when we publish a message, it will be directly written to the database, but for highly concurrent platforms, we will use the queue to store the published information in the queue, then the queue process is used to complete the warehouse receiving operation.

When we publish information, there will be a series of prompts, such as incorrect data format and failed data writing to the database. If a message like "failed data writing to the Database" does not exist after the queue is used, because the warehouse receiving operation is handed over to the queue, a message such as "publishing successful" is displayed as long as the queue is submitted at the front end. What should I do if the queue fails to be put into the database, in this case, the user's front-end prompt is not misleading, and the user experience is not good.

I want to know how to solve this problem. If you want to test whether the database can be successfully written into the database before submitting the data to the queue, what is the necessity of the queue?

Solution

Reply content:

Generally, when we publish a message, it will be directly written to the database, but for highly concurrent platforms, we will use the queue to store the published information in the queue, then the queue process is used to complete the warehouse receiving operation.

When we publish information, there will be a series of prompts, such as incorrect data format and failed data writing to the database. If a message like "failed data writing to the Database" does not exist after the queue is used, because the warehouse receiving operation is handed over to the queue, a message such as "publishing successful" is displayed as long as the queue is submitted at the front end. What should I do if the queue fails to be put into the database, in this case, the user's front-end prompt is not misleading, and the user experience is not good.

I want to know how to solve this problem. If you want to test whether the database can be successfully written into the database before submitting the data to the queue, what is the necessity of the queue?

Solution

The data validity has been verified before it is entered into the queue. As long as it is not an exception, it will not fail. There will also be a LOG record for exceptions, and a prompt will be displayed at the front end after the failure to tell the user when the message sent failed. Of course, this prompt is not real-time.

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.