The problem of multiple keys in ConfigWatch
See original GitHub issueHi,
I’m using consul config in a spring application, but I found a problem in the ConfigWatch.
I have two keys to watch. One is config/application/data which is for the common configuration, the ohter is config/appName/data which is for the private configuraion.
I hope that one of them is updated in consul, I need to kown the notification from consul. However, If config/application/data is blocked in the ConfigWatch and config/appName/data is updated now, the Spring application can’t get any notification from consul. Because config keys are not blocked in the same time, they do watch action one by one. Therefore one key is blocked in watch, the other will not get any notification even if it has been updated.
for (String context : this.consulIndexes.keySet()) {
...
    Response<List<GetValue>> response = this.consul.getKVValues(context, aclToken,
        new QueryParams(this.properties.getWatch().getWaitTime(),
            currentIndex));
...
}
So, how can I do to solve this problem?
Thanks.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (2 by maintainers)

 Top Related Medium Post
Top Related Medium Post Top Related StackOverflow Question
Top Related StackOverflow Question
I think the answer would be to execute them in parallel using projectreactor.io.
It really needs improvement, the waiting time is too long in multiple configurations.
The first configuration is the main configuration, and I only need to monitor the first configuration.
details pull #705