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

Customize Amazon SNS client so it automatically retries in case of error #917

Merged
merged 5 commits into from
Oct 1, 2019

Conversation

mprimi
Copy link
Contributor

@mprimi mprimi commented Sep 27, 2019

No description provided.

@mprimi mprimi added this to the 4.0.0 milestone Sep 27, 2019
@mprimi mprimi requested a review from tgianos September 27, 2019 23:14
@mprimi mprimi self-assigned this Sep 27, 2019
@coveralls
Copy link

coveralls commented Sep 30, 2019

Coverage Status

Coverage decreased (-0.02%) to 92.298% when pulling f3b7186 on mprimi:GENIE-488-sns-retries into e1e2499 on Netflix:master.

@codecov
Copy link

codecov bot commented Sep 30, 2019

Codecov Report

Merging #917 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #917      +/-   ##
============================================
- Coverage     89.34%   89.32%   -0.02%     
- Complexity     3352     3356       +4     
============================================
  Files           414      415       +1     
  Lines         13373    13386      +13     
  Branches        914      914              
============================================
+ Hits          11948    11957       +9     
- Misses         1028     1032       +4     
  Partials        397      397
Impacted Files Coverage Δ Complexity Δ
...spring/autoconfigure/aws/AWSAutoConfiguration.java 100% <100%> (ø) 4 <4> (?)
.../netflix/genie/web/properties/RetryProperties.java 100% <100%> (+7.14%) 7 <2> (+1) ⬆️
...ix/genie/web/tasks/leader/DatabaseCleanupTask.java 93.05% <0%> (-6.95%) 11% <0%> (-1%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e1e2499...f3b7186. Read the comment docs.

 - Create a new AWS autoconfiguration for the web module
 - Define named bean for RetryPolicy, ClientConfiguration and AmazonSNS.

The new beans can be overridden and customized further.
The default configuration simply activates the default retry policy with a number of retries defined via properties.
@mprimi
Copy link
Contributor Author

mprimi commented Sep 30, 2019

@tgianos I had to change this since your review.
Deployment was failing due to multiple beans of type AmazonSNS being found by some Spring Cloud configuration that expects a single one.
The only way i found of resolving this was to rename the custom SNS client so it overrides the one created by Spring Cloud. This results in a single client bean the custom one defined here.

spring-attic/spring-cloud-aws#63

@mprimi mprimi merged commit 5ee40df into Netflix:master Oct 1, 2019
@mprimi mprimi deleted the GENIE-488-sns-retries branch November 5, 2019 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants