redhat-developer / reactive-microservices-in-java

Source code from the Reactive Microservices in Java book
Apache License 2.0
140 stars 80 forks source link

HelloConsumerWithCircuitBreakerHttpVerticle. Circuit Breaker don't rediscover endpoint after reset #7

Closed gvisoc closed 6 years ago

gvisoc commented 6 years ago

When following the book walkthrough, when scaling to 0 pods the hello-microservice to open the circuit and later rescale to 1 pod to see the circuit closed again, it won't close as the Service Discovery code won't execute, so it wouldn't find the new pod. Some code has to be attached to the halfOpenHandler to re-discover the service.

cescoffier commented 6 years ago

You are right.

This line is missing:

circuit.halfOpenHandler(v -> single.subscribe(client -> this.hello = client));