AppConfiguration icon indicating copy to clipboard operation
AppConfiguration copied to clipboard

ConfigureRefresh: support for watching a group of keys

Open cannehag opened this issue 4 years ago • 5 comments

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 ?

cannehag avatar Sep 27 '19 10:09 cannehag

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.

drago-draganov avatar Sep 27 '19 19:09 drago-draganov

Is this feature planned for the near future?

Tankatronic avatar Nov 20 '20 22:11 Tankatronic

@Tankatronic this is something we want to do but not planned for the near future due to other priorities.

zhenlan avatar Feb 16 '21 20:02 zhenlan

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?

image

Edgaras91 avatar Dec 21 '21 10:12 Edgaras91

@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.

drago-draganov avatar Dec 21 '21 23:12 drago-draganov