Skip to content

Allow multiple sentinel keys with same key but different label for refresh #346

@TheAsteroid

Description

@TheAsteroid

We use App Configuration in a micro-service architecture, where all configuration of a single micro-service are labelled with the name of that micro-service. In addition we also have global configurations that apply to all micro-services, which we don't give a label. We would like to be able to do the following, to either trigger refresh for all micro-services, or only for a single micro-service when we change global or micro-service configurations:

  • Use a key named RefreshSentinel with label \0 to monitor changes to global settings
  • Use a key named RefreshSentinel with label MicroServiceA to monitor changes to settings for MicroServiceA.
  • Use a key named RefreshSentinel with label MicroServiceB to monitor changes to settings for MicroServiceB.

Currently this is impossible, due to the implement here, which overwrites previous refresh registrations with the same key in the RefreshRegistrations dictionary: https://github.com/Azure/AppConfiguration-DotnetProvider/blob/fbde2ecd1a0262675a1c677f322a1a0fec26c1da/src/Microsoft.Extensions.Configuration.AzureAppConfiguration/AzureAppConfigurationRefreshOptions.cs#L41

A workaround is to have a sentinel key RefreshSentinel:MicroServiceA, but we would like to stick to labels, since that's how we differentiate between environments.

Could this behaviour be changed to have refresh registrations with key-label combination?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions