These are chat archives for spring-cloud/spring-cloud

10th
Aug 2017
Andrew Fitzgerald
@fitzoh
Aug 10 2017 01:11
Anyone know what the status of spring-cloud-cloudfoundry-service-broker is?
just wondering if there’s going to be support for it going forward or if it’s more experimental
Dave Syer
@dsyer
Aug 10 2017 08:03
It's in the spring-cloud org. I don't see it going away (they use it in pivotal cloud foundry)
Andrew Fitzgerald
@fitzoh
Aug 10 2017 13:31
cool, thanks dave
Mirza Maznikar
@mmaznikar
Aug 10 2017 13:44

Hi, I'm using a quartz scheduler with spring cloud config server and I need to update the quartz job fire interval on runtime configuration property change. I tried the approach to publish a custom event on the setter of the specific property in the @ConfigurationProperties class which seems to work, but I have some doubts on whether It's a good idea because of the following reasons:

  1. Spring documentation recommends not to inject anything in the @ConfigurationProperties class (In this case I'm injecting ApplicationEventPublisher)
  2. I have to avoid sending the event on initialization when the application starts and the setter is invoked
  3. For some reason the setter is invoked multiple times, 7 times on startup and twice on /refresh to be exact

Is there a better way of achieving the same thing? I know I can listen for EnvironmentChangedEvent but that doesn't solve my problem because the event is published for any configuration change and I have no way of checking if the specific interval property has changed unless I add another configuration field that would represent the name of the property, so I could check against the changed keys in the received event.