Business Process
- In the business module of the scheduled task, use the @Scheduled annotation to write a task that is executed regularly every day to send messages to the message queue. The main purpose is the notification function.
- Set up monitoring in the order module to call the notification service, query the order of the day to obtain user information, thereby notifying specific users, and finally call the send SMS module to send the specific SMS content.
To be optimized: messages may be lost and consumed repeatedly
Suggestion: You can use redis and mysql to cache messages, achieve message compensation, and solve idempotence.