@@ -64,15 +64,15 @@ public class ScheduledMessageProducer {
...
@@ -64,15 +64,15 @@ public class ScheduledMessageProducer {
}
}
```
```
### 3.Verification
### 3Verification
You should see messages are consumed about 10 seconds later than their storing time.
You should see messages are consumed about 10 seconds later than their storing time.
### 4.Use scenarios for scheduled messages
### 4Use scenarios for scheduled messages
For example, in e-commerce, if an order is submitted, a delay message can be sent, and the status of the order can be checked after 1 hour. If the order is still unpaid, the order can be cancelled and the inventory released.
For example, in e-commerce, if an order is submitted, a delay message can be sent, and the status of the order can be checked after 1 hour. If the order is still unpaid, the order can be cancelled and the inventory released.
### 5.Restrictions on the use of scheduled messages
### 5Restrictions on the use of scheduled messages
Nowadays RocketMq does not support any time delay. It needs to set several fixed delay levels, which correspond to level 1 to 18 from 1s to 2h. Message consumption failure will enter the delay message queue. Message sending time is related to the set delay level and the number of retries.
Nowadays RocketMq does not support any time delay. It needs to set several fixed delay levels, which correspond to level 1 to 18 from 1s to 2h. Message consumption failure will enter the delay message queue. Message sending time is related to the set delay level and the number of retries.