Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Should the tcp client reconnect? #54

Open
bitkid opened this issue May 26, 2015 · 2 comments
Open

Question: Should the tcp client reconnect? #54

bitkid opened this issue May 26, 2015 · 2 comments

Comments

@bitkid
Copy link

bitkid commented May 26, 2015

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!

@aphyr
Copy link
Collaborator

aphyr commented May 26, 2015

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

@christophsturm
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants