Common Solutions for Scheduling and Delay Problems in Business Scenarios

1) Scenarios

The demand for scheduled and delayed processing is ubiquitous in the processes of information distribution and business. We often encounter problems such as, what are the elegant ways to handle expected events and distribute defined information at a certain point of time in the future, and how to design scenarios and business logic with demanding timeline requirements. After comparing several commonly used technical solutions, I summarized them as follows, and each of them has its own pros and cons:

  • It supports high availability.
  • The scheduled time is sufficient, for example, 30 or 60 days.
  • It supports the cancellation of scheduled messages and delayed tasks.
  • It supports absolute and relative scheduling.
  • It supports the storage of massive scheduled messages with high efficiency and accuracy.

2) Concepts

Now, let’s look at the concepts of scheduled messages and delayed messages in RocketMQ. Based on the user perspective and experience, messages can be divided into scheduled messages and delayed messages.

  • Delayed Message: The producer sends a message to the RocketMQ server, but intends the message to be sent to the consumer after a period of time, that is, as a delayed message. See “Scenario 1” and “Scenario 2” in the previous section for reference.

3) Advantages of RocketMQ Scheduled Messages

  • High Performance and Availability

4) Special Introduction

In the new version of the scheduled message function, the kernel layer architecture is deeply optimized, the design principles and functional implementations are significantly upgraded and tuned, and the architecture of scheduled messages is fundamentally renovated. The new version greatly improves the stability and performance of scheduled messages.

Original Source:



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store