简体   繁体   中英

Java retry logic after migration or application restart

I am looking for a library that can retry faied jobs after server restart. For example my API expose endpoint that allow end user to upload photo and then I need asynchronusly upload this photo to third part API.

Spring Retry seemed a perfect option for me, but I can't be sure the faild job will resume after application restart. I tried to implement RetryContextCache that stores serialized objects in the database, but it does not work.

If there is any production ready library or any other way I can achive this?

You can take a look at the JobRunr and Quartz Scheduler libs.

Alternatively you could just use Spring Scheduler and check manually, if there new/unfinished jobs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM