AppConfiguration
AppConfiguration copied to clipboard
ConfigureRefresh: support for watching a group of keys
Hi, I'm use App Configuration registration as follows:
builder.AddAzureAppConfiguration(configure =>
{
var label = $"{config["Config:AppName"]}-{config["Config:ConfigName"]}";
configure.Connect("xyz")
.Use(KeyFilter.Any, label)
});
This is working perfectly fine. But when adding a ConfigureRefresh with the same key/label filter. I don't get any updates. .ConfigureRefresh(refresh => { refresh.Register(KeyFilter.Any, label, true); });
I would expect this to work. I have seen the workaround using a sentinel key. But thats really just a workaround and not the ideal solution. Is a more configurable solution in the roadmap ?
Currently we support watching keys individually. The sentinel key approach is also to avoid getting intermediate states during update of multiple keys. We plan to extend the refresh to allow the scenario you mentioned, indeed.
Is this feature planned for the near future?
@Tankatronic this is something we want to do but not planned for the near future due to other priorities.
Curious if the priorities have changed for this? Seems like the "sentinel" key way should be an optional feature to achieve all key refresh, and by default, it should allow for all keys to be monitored and refreshed as per original post using KeyFilter.Any.
Is there a way around this? for example by enumerating the IConfiguration Azure provider's keys? And subscribe to each of them?
@Edgaras91 This is still on our radar. We are looking into service side solutions. Subscribing for individual keys on the client side would lead to significant amount of poll requests. I'm also thinking of instances with hundreds and thousands of key-values. That can easily go above the request quotas and result into unexpected overage charge and/or throttling. In addition, client side may have issues when new keys are being added to the specific set.