TransportClient Java API

Some questions about the java TransportClient

  1. Does it make sense to instantiate multiple TransportClient to the same (found) cluster?

  2. Does the TransportClient tries to reconnect to the cluster if disconnected. How long does this take?

  3. What do you guys consider as acceptable time outs: it's possible to set a timeout value on query run time on the cluster, as well as a timeout on the waiting time of the client. client.prepareSearch().setTimeout(cluster_timeout).execute().actionGet(client_timeout);

  4. Does the TransportClient has default timeout values?

Hi

  1. No. One single Client per JVM. It's thread safe.
  2. I don't really know. I always said that I need to run some tests and make sure of that but never did it. I'll try if I can soonish but if you do yourself some tests, could you share here your results? If it's not reconnecting, may be you could open an issue in that case?
  3. I never use timeouts. But for tests when I want them to fail fast (when I expect something failing). Otherwise, I'm keeping all defaults.
  4. I looked at the code and the searchRequest as no timeout by default.

Best