Open glennvdv opened 5 years ago
es server does not provide such information over tcp (protobuf messages), but es server has Ping
command - it could be used to check manually the availability of es server (e.g.: eventstore.ping()
- not implement at the moment).
another option to monitor the client (i know it's not the same) is to use client listener, that notifies on connection lost/established:
eventstore.addListener(e -> {
if (e instanceof ClientConnected) {
System.out.println("connected");
} else if (e instanceof ClientDisconnected) {
System.out.println("disconnected");
} else if (e instanceof ConnectionClosed) {
System.out.println("connection closed");
}
});
eventstore.connect();
It would be nice that the evenstore client supports an info method, which returns the /info information from eventstore (version, ...). This way we can use this as HealthIndicator.