Prevent data loss solution

Since the use of mq instead of db, or encountered a lot of trouble recently encountered the problem of lost data, it is very serious for customers, can not be accepted. For we also feel very strange, I do not use the message queue is to better control data do!

The investigation found, the data out from mq in the future, notice mq delete the data, and then to deal with the data, processing the data that failed because retry mechanism, the data is lost.

And then look at the introduction of mq previous code, used to be found only let go after db processed data deleted, although if the process fails, still will delete the data, but at least throw an exception when the data Modiu.

Now the code was changed to only deal with success in the data removal from mq, hoping to solve this problem.

Guess you like

Origin www.cnblogs.com/mryux/p/12074934.html