I have two different spring-cloud services using spring-cloud-starter-bus-kafka to receive new config refresh from a centralize service. When call refreshBusEndpoint.busRefresh() in centralize
- service-A receive:RemoteApplicationEvent
originService = null
destinationService = "**"
id = "6a8d95fc-5954-4eac-b45d-ba8b34da1f9f"
timestamp = 1590192298082
- service-B received:
originService = "centralize-configuration:8888:3f31c745f983d0dd22d9988758d518a0"
destinationService = "**"
id = "7e986811-1c12-4d85-939c-054c5de9171f"
timestamp = 1590221239086
The problem is originService = null will cause error
-> BusAutoConfiguration acceptRemote(RemoteApplicationEvent event)
-> !this.serviceMatcher.isFromSelf(event)
-> matcher.match(originService, serviceId)
-> AntPathMatcher.class
-> match(), doMatch()
statement stop by null pointer: pattern.startsWith(this.pathSeparator)
- Both services using:
spring-cloud.version -> Greenwich.RELEASE
spring.boot.version -> 2.1.6.RELEASE
spring.kafka.version -> 2.2.9.RELEASE
Can someone explain the reason for my service got event with originService = null ?