2

Following is my bootstrap.yml configuration:

spring:
  application:
    name: myService
  cloud:
    consul:
      config:
        enabled: true
        prefix: config
        profileSeparator: '@@'
        watch:
          wait-time: 10
          delay: 10000
          enabled: true

When I update a value in Consul for a given key, I am able to eventually see that the RefreshEvent is received and processed by my service, but it seems to take a constant amount of time, not within 10 seconds like I'm thinking it should given my configuration. Does anyone have experience using ConfigWatch, and, if so, how do you configure it so that it picks up changes every X number of seconds?

BTW, we're using Spring Cloud Camden.SR5.

Keith Bennett
  • 733
  • 11
  • 25

1 Answers1

0

OK, for those who run across this post, I found out through more testing that the delay is due to the time spent in ConfigWatch.watchConfigKeyValues(). I'm not sure at this point why this method takes a long time to execute, but it does. The config values I use aren't the issue in getting the Consul configuration changes updated in my services - it's the amount of time spent in the watchConfigKeyValues() that's causing the delay.

Keith Bennett
  • 733
  • 11
  • 25