Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

重试时的方法和参数是否能进行持久化 #13

Open
zhangyungen opened this issue Jun 30, 2022 · 1 comment
Open

重试时的方法和参数是否能进行持久化 #13

zhangyungen opened this issue Jun 30, 2022 · 1 comment

Comments

@zhangyungen
Copy link

1、对重试的方法和参数进行持久化,当重试超过多少次失败,进行持久化。等待一段时间,再次进行重试。让方法得以最终执行。
2、此种应用场景是在最终一致性的时候进行,比如当外部服务失效一段时间。这个时候我需要进行回补操作,使得数据最终一致。

@houbb
Copy link
Owner

houbb commented Jun 30, 2022

你说的应该可以通过 recover 来实现.

/**
     * 恢复操作
     * 1. 默认不进行任何恢复操作
     * @return 恢复操作对应的类
     */
    Class<? extends Recover> recover() default NoRecover.class;

指定自己的 recover 策略为持久化,然后定时任务补偿。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants