How to call a method after a specific time interval in Java

The following are use cases:

I'm using Java (using spring)

Once the user confirms his subscription (through the web application), I want to send him an email in 30 minutes

What now? Do I need a message broker? Or something like scheduled executorservice? Do I need some kind of queue?

Please give me some advice

Solution

You can view the quartz scheduler

By the way, a common strategy is to send a large number of all pending emails every 30 minutes or so Quartz can also help you do this

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>