Joke Collection Website - Public benefit messages - How to implement new order reminder in java web

How to implement new order reminder in java web

Generally speaking, push will try to maintain a role similar to the message center. The order service notifies the message center through some mechanism, and the message center is uniformly scheduled to generate messages. There are many ways at this stage. Message queue is one of them. If the system It is relatively small, and even the message center and orders are both directly called by the system or can be solved by using the following observer mode. The second stage is conventional development. The request is initiated by the front desk and the background responds. Now it is reversed. The simplest way is to maintain the connection in the background. If ajax polling is not the core function, you can try WebSocket. If the background is SpringMVC, SockJS can be naturally integrated. For most systems, the ideal design is to decouple the order and message center from the message middleware. The message center comes through WebSocket. When pushing messages, the message center is a separate service. Even if it explodes, it will not affect the main system