Delivery is mainly targeted at the production end. What is the reliability delivery at the production end?

  • Ensure that messages are sent successfully
  • Ensure that the MQ node receives the message successfully
  • The sender receives an acknowledgement from MQ
  • Complete message compensation mechanism, only do the first three steps, maybe the production side failed

BAT/TMD Internet factory solutions, depending on the specific business and concurrency

  • The message falls into the database and marks the message status
  • Delayed message delivery, secondary check, callback check

details

Step of message dropping:

  1. Write to the database, which may involve multiple libraries, business libraries, message libraries
  2. Send a message
  3. Message to confirm
  4. Update the database message status
  5. The scheduled task obtains the database message status
  6. Retry sending
  7. If the number of retries is greater than three, change the status

Delayed delivery: If the situation is high concurrency, the message should not be stored. Delayed delivery may not guarantee 100% success in the first time, but it must ensure performance.

  1. Upstream: Wait until the data is stored before sending the initial message
  2. Delay sending check messages that have just been sent
  3. When consumers consume news
  4. After the message consumption is successful, a confirmation consumption message is sent
  5. The CallBack service receives the confirmation message from the consumer and stores the message persistently after the successful consumption
  6. The CallBack service checks the message sent in the second step to see if it was successfully processed by the database. If it was successfully processed, nothing needs to be done. If it failed, the CallBack service notifies the Upstream service to send the message again.

The last

  • Moocs RabbitMQ message middleware