advantageous/qbit

How totally stop/disable health service on my server?

alexhumanbean opened this issue · 3 comments

How totally stop/disable health service on my server?
There are lots of annoying messages in the log HealthService::checkInOk() many times...
I tried many ways,but it's still alive:

ManagedServiceBuilder......setEnableLocalHealth(false).setHealthService(null);
.....
managedServiceBuilder.....setEnableHealthEndpoint(false)
.....
HealthServiceImpl healthService.....
healthService.stop();

I assume the health service is already stopped.
BUT how to disable these HEALTH CHECKS ??? (I don't want to recompile QBit nor to use reflection)

The only way I have found:

public class EndpointServerBuilderNoHealth extends EndpointServerBuilder {
public HealthServiceAsync getHealthService() {
return null;
}
}

You could also create a class that implements HealthServiceAsync and then set EndpointServerBuilder's health service:

serverBuilder.setHealthService(new HealthServiceAsyncImpl());