{"action":"created","issue":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul/issues/416","repository_url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul/issues/416/labels{/name}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul/issues/416/comments","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul/issues/416/events","html_url":"https://github.com/spring-cloud/spring-cloud-consul/issues/416","id":318303241,"node_id":"MDU6SXNzdWUzMTgzMDMyNDE=","number":416,"title":"The problem of  multiple keys in ConfigWatch","user":{"login":"ChaoyongLiang","id":38773642,"node_id":"MDQ6VXNlcjM4NzczNjQy","avatar_url":"https://avatars2.githubusercontent.com/u/38773642?v=4","gravatar_id":"","url":"https://api.github.com/users/ChaoyongLiang","html_url":"https://github.com/ChaoyongLiang","followers_url":"https://api.github.com/users/ChaoyongLiang/followers","following_url":"https://api.github.com/users/ChaoyongLiang/following{/other_user}","gists_url":"https://api.github.com/users/ChaoyongLiang/gists{/gist_id}","starred_url":"https://api.github.com/users/ChaoyongLiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChaoyongLiang/subscriptions","organizations_url":"https://api.github.com/users/ChaoyongLiang/orgs","repos_url":"https://api.github.com/users/ChaoyongLiang/repos","events_url":"https://api.github.com/users/ChaoyongLiang/events{/privacy}","received_events_url":"https://api.github.com/users/ChaoyongLiang/received_events","type":"User","site_admin":false},"labels":[{"id":1100056180,"node_id":"MDU6TGFiZWwxMTAwMDU2MTgw","url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul/labels/feedback-reminder","name":"feedback-reminder","color":"ededed","default":false},{"id":253810173,"node_id":"MDU6TGFiZWwyNTM4MTAxNzM=","url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul/labels/waiting%20for%20feedback","name":"waiting for feedback","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-27T07:19:31Z","updated_at":"2018-11-28T09:15:53Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\nI'm using consul config in a spring application, but I found a problem in the ConfigWatch.\r\nI 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.\r\nI 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. \r\n```Java\r\nfor (String context : this.consulIndexes.keySet()) {\r\n...\r\n    Response<List<GetValue>> response = this.consul.getKVValues(context, aclToken,\r\n        new QueryParams(this.properties.getWatch().getWaitTime(),\r\n            currentIndex));\r\n...\r\n}\r\n```\r\nSo, how can I do to solve this problem?\r\n\r\nThanks.\r\n"},"comment":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul/issues/comments/442375173","html_url":"https://github.com/spring-cloud/spring-cloud-consul/issues/416#issuecomment-442375173","issue_url":"https://api.github.com/repos/spring-cloud/spring-cloud-consul/issues/416","id":442375173,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjM3NTE3Mw==","user":{"login":"ChaoyongLiang","id":38773642,"node_id":"MDQ6VXNlcjM4NzczNjQy","avatar_url":"https://avatars2.githubusercontent.com/u/38773642?v=4","gravatar_id":"","url":"https://api.github.com/users/ChaoyongLiang","html_url":"https://github.com/ChaoyongLiang","followers_url":"https://api.github.com/users/ChaoyongLiang/followers","following_url":"https://api.github.com/users/ChaoyongLiang/following{/other_user}","gists_url":"https://api.github.com/users/ChaoyongLiang/gists{/gist_id}","starred_url":"https://api.github.com/users/ChaoyongLiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChaoyongLiang/subscriptions","organizations_url":"https://api.github.com/users/ChaoyongLiang/orgs","repos_url":"https://api.github.com/users/ChaoyongLiang/repos","events_url":"https://api.github.com/users/ChaoyongLiang/events{/privacy}","received_events_url":"https://api.github.com/users/ChaoyongLiang/received_events","type":"User","site_admin":false},"created_at":"2018-11-28T09:15:53Z","updated_at":"2018-11-28T09:15:53Z","author_association":"NONE","body":"> They are executed in order. Are you saying that if one is updated while watching the other that the other is never updated?\r\n\r\nHello, thank you for your answer.\r\n\r\n**The othe is not never updated, it will update after the watching key has updated or watch timeout.**\r\neg: \r\nIf `config/application/data` is blocked for 5 minutes in the ConfigWatch, the other key `config/appName/data` is updated now. However, I can't get notifycation from consul. Because ConfigWatch is watching the key `config/application/data`  in process.\r\n\r\nAfter 5 minutes, the watching `config/application/data`  is returned, ConfigWatch starts to watch the other key `config/appName/data`, I can get notifycation from consul because the key has been updated.\r\n**But the notifycation is delayed in 5 minutes.**\r\n\r\n**I means that ConfigWatch should watch all keys that  belong to the application concurrently, instead of one by one.**"}}
{"actor":{"display_login":"ChaoyongLiang"}}