How to avoid activeMQ data loss

Do message persistence With jdbc, kahadb or leveldb + zookeeper,
first set the message sending to persistent sending (mq's own attribute), and then use jdbc kahadb leveldb + zookeeper to do message storage for persistence.
The idea is that after the sender (message producer) sends the message, the message center first stores the message in a local data file, in-memory database, or remote database. Then try to send the message to the receiver, if successful, delete the message from the storage, if it fails, continue to try to send. After the message center is started, it is necessary to check whether there are unsuccessfully sent messages in the specified storage location. If there are, the messages in the storage location will be sent out first.

Guess you like

Origin www.cnblogs.com/wl889490/p/12676465.html