riemann/riemann-java-client

Question: Should the tcp client reconnect?

bitkid opened this issue · 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!

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

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