advantageous / qbit

The Java microservice lib. QBit is a reactive programming lib for building microservices - JSON, HTTP, WebSocket, and REST. QBit uses reactive programming to build elastic REST, and WebSockets based cloud friendly, web services. SOA evolved for mobile and cloud. ServiceDiscovery, Health, reactive StatService, events, Java idiomatic reactive programming for Microservices.
http://advantageous.github.io/qbit/
Apache License 2.0
709 stars 140 forks source link

How totally stop/disable health service on my server? #773

Open alexhumanbean opened 7 years ago

alexhumanbean commented 7 years ago

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();

alexhumanbean commented 7 years ago

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)

alexhumanbean commented 7 years ago

The only way I have found:

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

manysc commented 7 years ago

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

serverBuilder.setHealthService(new HealthServiceAsyncImpl());