configcat / java-sdk

ConfigCat SDK for Java. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
https://configcat.com/docs/sdk-reference/java
MIT License
20 stars 6 forks source link

Hook for Changed Features #27

Open MarwinMoellers opened 1 year ago

MarwinMoellers commented 1 year ago

Is your feature request related to a problem? Please describe.

When Programming reactively or asyncronusly it is only interesting to know when a Feature has changed. I don't believe the (...)Async Endpoints are helpful here.

Describe the solution you'd like

I would like to be notified when the value of a Feature Toggle/Config is Changed. Optimally I would like to listen to Spring Application Events.

Describe alternatives you've considered

Alternatively a simple Oberserver-Pattern would be fine. Or any other Pub-Sub Pattern.

Additional context

We are using it with Spring Gateway, and want to change the Routing during Runtime based on the Toggles State.

z4kn4fein commented 1 year ago

Hi @MarwinMoellers, thank you for the suggestion! Currently, the SDK doesn't track changes for individual feature flags, only for the whole config. I assume you already know this, but it can only send the modified Map<string, Setting> map to the user via the onConfigChanged hook.

I'll put this topic on our next dev meeting's agenda to discuss it with the team. I'll let you know about the results.

MarwinMoellers commented 1 year ago

Hey @z4kn4fein, thanks for the quick response. We'll construct it for ourself then. Once the hooks work 👍 But I think there might be more widespread use for this feature.

z4kn4fein commented 1 year ago

Hey @MarwinMoellers , we discussed your suggestion and agreed that it would be a valuable feature to notify clients about which feature flags have been changed. We put a ticket about that on our SDK development board and will implement it soon in each SDK.

github-actions[bot] commented 1 year ago

This issue is marked stale because it has no activity in the last 3 weeks. The issue will be closed in one week. Please remove the stale flag to keep it open.

github-actions[bot] commented 1 year ago

This issue is marked stale because it has no activity in the last 3 weeks. The issue will be closed in one week. Please remove the stale flag to keep it open.

github-actions[bot] commented 1 year ago

This issue is marked stale because it has no activity in the last 3 weeks. The issue will be closed in one week. Please remove the stale flag to keep it open.

adams85 commented 1 year ago

Hi @MarwinMoellers,

FYI, we added this feature request to our public roadmap, however we don't expect it earlier than Q4.

github-actions[bot] commented 1 year ago

This issue is marked stale because it has no activity in the last 3 weeks. The issue will be closed in one week. Please remove the stale flag to keep it open.

github-actions[bot] commented 1 year ago

This issue is marked stale because it has no activity in the last 3 weeks. The issue will be closed in one week. Please remove the stale flag to keep it open.

github-actions[bot] commented 1 year ago

This issue is marked stale because it has no activity in the last 3 weeks. The issue will be closed in one week. Please remove the stale flag to keep it open.