The spring.cloud.config.name property can be used in spring-cloud-config-client to change the service name to be used to query configuration from the Config Server. But when using spring-cloud-config-monitor on the Config Server, the destination service of the RefreshRemoteApplicationEvent is set to the service name derived from the config file that has changed. A service with spring.application.name: X can fetch file Y.yml from the Config Server by setting spring.cloud.config.name: Y. But if Y.yml gets changed, the destination Service is set to Y by config server, and the ServiceMatcher class of spring-cloud-bus matches this against spring.application.name only, so the change to Y.yml does not trigger the config refresh as expected, because the spring.application.name does not match Y.
The
spring.cloud.config.name
property can be used in spring-cloud-config-client to change the service name to be used to query configuration from the Config Server. But when using spring-cloud-config-monitor on the Config Server, the destination service of the RefreshRemoteApplicationEvent is set to the service name derived from the config file that has changed. A service withspring.application.name: X
can fetch file Y.yml from the Config Server by settingspring.cloud.config.name: Y
. But if Y.yml gets changed, the destination Service is set to Y by config server, and the ServiceMatcher class of spring-cloud-bus matches this againstspring.application.name
only, so the change to Y.yml does not trigger the config refresh as expected, because thespring.application.name
does not match Y.This was first reported in https://github.com/spring-cloud/spring-cloud-config/issues/1141, i also open an issue here by request, because one possible solution is to take
spring.cloud.config.name
in account in ServiceMatcher.