-
Notifications
You must be signed in to change notification settings - Fork 47
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
retry module integration #2
Comments
Let's reopen if someone ask for that. |
Consider this an ask for retry! I'd love to rip out the direct JavaMail implementation in https://github.com/target/data-validator and use something more idiomatic. |
Will look into it soon. What would be an ideal interface for you to implement this, can you share some code? |
Thanks for considering this! In this comment, I explored a pair of retry solutions that met my expectations for interface and code quality (I've implemented internal retry libraries in three languages at three companies in the last decade, so I've got strong opinions loosely held, haha). Either will do just fine, I think. The builder pattern in courier/src/main/scala/mailer.scala Lines 36 to 38 in 9533af2
Since courier is already using Futures there, it's probably cleanest to use SoftwareMill's retry package. The above would be come something like this: val retry = buildRetryPolicyFromConfig(_session.retryConfig)
retry(() => Future {
Transport.send(msg)
}) |
One month later, sorry, life happens ehh. I'm checking it out today. The plan would be to put that feature in a separate artifact: |
WIP: #61 I need retry for scala 3: softwaremill/retry#39 I would like some feedback from you @colindean. See the readme update in the PR and let me know what you think. More specifically, what do you think of:
|
would like to retry if a send fails. this should use retry to retry futures
The text was updated successfully, but these errors were encountered: