riemann-java-client icon indicating copy to clipboard operation
riemann-java-client copied to clipboard

Question: Should the tcp client reconnect?

Open bitkid opened this issue 9 years ago • 2 comments

riemannClient = RiemannClient.tcp(ipAddress, clientPort); riemannReporter = RiemannReporter.forRegistry(metrics) .localHost(hostInfo.hostName.split(".")[0] + "." + hostInfo.datacenter) .prefixedWith(getReporterPrefix(hostInfo.hostName)) .tags(Arrays.asList("check", "proto", "graph")) .useSeparator(".") .convertDurationsTo(TimeUnit.MILLISECONDS) .convertRatesTo(TimeUnit.SECONDS) .build(new Riemann(riemannClient)); riemannReporter.start(reportingIntervalMillis, TimeUnit.MILLISECONDS);

that's how we initialise the client. with this configuration .. should the client reconnect if the riemann server goes down and comes up again? It seems to me that it does not.

Thanks, Sascha!

bitkid avatar May 26 '15 14:05 bitkid

It does automatically reconnect, but it looks like you might be missing a call to client.connect in the first place?

aphyr avatar May 26 '15 14:05 aphyr

the reporter calls client connect anytime it sends something, so calling connect does not seem necessary.

christophsturm avatar Jun 24 '15 23:06 christophsturm