-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Using Configuration to Setup Polly #143
Comments
@RehanSaeed Thanks for sharing this. There are some similar ideas in issue #50, with discussion around the different aspects of a policy that could be configured (numeric parameters; exceptions handled?); different configuration sources and methods of application; and configuration-only-at-startup versus reconfiguration-during-execution. Please feel free to have a read of #50, and add any further ideas/comments! |
While the two issues talk about config, I feel they are talking about two different kinds of config. That issue is talking about using |
@RehanSaeed Agreed: if a strategy for configuring policies depends on approaches not part of .NET Core, that would certainly be part of a separate package. |
Triage of old issues: Configuring policies from lightweight POCOs - or interfaces which group the relevant configuration parameters - remains a possible later addition. Some initial work can be found in this branch. The approach is configuration-provider interfaces: eg
The core Polly package would likely contain only the interfaces and matching flat POCOs. Specific implementations would live in separate Priority: Low. Possibly in tandem with any work on refreshed Polly syntax. Community contributions welcome: lower prio for the core Polly maintainers. I can provide guidance if anyone wants to pick up this work. |
Pinging on this thread, to alert that there is a lot of related discussion going on in the ASP.NET Core 2.1 |
Hi - i am a bit confused right now. Im having the same issue as the OP, i am firing a method with polly and i'd like to set the data from appsettings.json. Is there any progress on this or? |
Thanks @sommmen for the question. There is no extra |
Hello sir, Thanks for your reply. Just wanted to make sure I did not reinvent the wheel. |
Triage: Closing this issue as not something the core Polly team is likely to add. Back when this issue was proposed, it made a lot of sense, as Polly had only two policies, configured in mostly-numeric ways. Polly now offers a wider range of policies, and a range of more powerful ways of configuring them:
TL;DR A config-constant-driven |
I've written the following extension method to help me configure Polly from my ASP.NET Core JSON configuration file. It may help others if something more complete was included in Polly itself.
The text was updated successfully, but these errors were encountered: