- 
                Notifications
    You must be signed in to change notification settings 
- Fork 41.6k
Description
Description
I have a service MyServiceImpl that listen to the ApplicationReadyEvent
In the method doStuff I run a while(true) - run forever
(In the original app I run a (infinite) sink that is getting data from a rest endpoint and publish it to kafka)
In spring boot 2.3.1 the actuator endpoint status for readiness is OUT_OF_SERVICE because the listener doesn't finish
In spring boot 2.2.8 the actuator endpoint status for readiness is UP
spring-boot or spring-actuator problem
- 
Start the app with spring boot 2.3.1 
 mvn spring-but:run
 -access the endpoint for readiness
 http://localhost:8080/.mystatus/ready
 -The health is "status": "OUT_OF_SERVICE"
- 
Start the app with spring boot 2.2.8 
 mvn spring-but:run
 access the endpoint for readiness
 http://localhost:8080/.mystatus/ready
 The health is "status": "UP"
public class MyServiceImpl { @EventListener(ApplicationReadyEvent.class) public void doStuff(){ int count = 0; while(true){ try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println(count++); } } }