These are chat archives for spring-cloud/spring-cloud
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:
@ConfigurationPropertiesclass (In this case I'm injecting
/refreshto 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.