@Nathan Quirk Thanks for reaching out. App Configuration has two libraries for Spring: azure-spring-cloud-appconfiguration-config
and azure-spring-cloud-appconfiguration-config-web
. Here are some Spring Boot alternatives to match the guidance provided to reduce the number of requests made:
- To increase the refresh timeout, you can specify a new refresh timeout using the
spring.cloud.azure.appconfiguration.stores[0].monitoring.watch-interval
property for thev2.0.0
library, orspring.cloud.azure.appconfiguration.cache-expiration
for earlier versions. - Watch a single sentinel key, rather than watching individual keys. Refresh all configuration only if the sentinel key changes. See Use dynamic configuration in a Java Spring app for an example.
- If you don't want to constantly poll for any changes, you may consider using a Push refresh model to detect changes in configuration. Once App Configuration is set up to send key value change events with Azure Event Grid, with a Web Hook, the application can use these events to optimize the total number of requests needed to keep the configuration updated. For more information, see Use dynamic configuration using push refresh in a Java Spring app.
API References:
- Azure Spring cloud starter App Configuration client library for Java - Version 2.0.0
- Azure Spring cloud starter App Configuration client library for Java - Version 1.3.0
Hope this helps. Do let us know if you have further questions.
----------
If an answer is helpful, please "Accept answer" and/or "Up-Vote" which might help other community members reading this thread.