Create an elasticsearch pool on Spring project

Its posible create an elasticsearch pool like an hibernate pool??

Thanks

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/03be8ad7-40cf-4442-ad39-d76509a8ca10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Why do you need a pool?

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs

Le 12 janv. 2015 à 14:11, Pablo Blasco pablo3027@gmail.com a écrit :

Its posible create an elasticsearch pool like an hibernate pool??

Thanks

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com mailto:elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/03be8ad7-40cf-4442-ad39-d76509a8ca10%40googlegroups.com https://groups.google.com/d/msgid/elasticsearch/03be8ad7-40cf-4442-ad39-d76509a8ca10%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/0E7F08DA-E60E-4F11-87E8-7C218ED30D9B%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

We have a socket config. The problem its the connections keep alive before
we do a client.close() statement.

We want to usage the same connection object with diferent clients if its
posible...

Thanks

El lunes, 12 de enero de 2015, 15:11:22 (UTC+1), David Pilato escribió:

Why do you need a pool?

--
David Pilato | Technical Advocate | Elasticsearch.com
http://Elasticsearch.com

@dadoonet https://twitter.com/dadoonet | @elasticsearchfr
https://twitter.com/elasticsearchfr | @scrutmydocs
https://twitter.com/scrutmydocs

Le 12 janv. 2015 à 14:11, Pablo Blasco <pabl...@gmail.com <javascript:>>
a écrit :

Its posible create an elasticsearch pool like an hibernate pool??

Thanks

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/03be8ad7-40cf-4442-ad39-d76509a8ca10%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/03be8ad7-40cf-4442-ad39-d76509a8ca10%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6a8d402d-d2c7-4fed-8704-9b5e1be1a0fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

So just create a Singleton for the full JVM and share it across all threads.
Don’t create and close client for each request. close() should be called only when you totally stop your application.

BTW you can look at this: https://github.com/dadoonet/spring-elasticsearch https://github.com/dadoonet/spring-elasticsearch

My 2 cents

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs

Le 12 janv. 2015 à 15:15, Pablo Blasco pablo3027@gmail.com a écrit :

We have a socket config. The problem its the connections keep alive before we do a client.close() statement.

We want to usage the same connection object with diferent clients if its posible...

Thanks

El lunes, 12 de enero de 2015, 15:11:22 (UTC+1), David Pilato escribió:
Why do you need a pool?

--
David Pilato | Technical Advocate | Elasticsearch.com http://elasticsearch.com/
@dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs

Le 12 janv. 2015 à 14:11, Pablo Blasco <pabl...@gmail.com <javascript:>> a écrit :

Its posible create an elasticsearch pool like an hibernate pool??

Thanks

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/03be8ad7-40cf-4442-ad39-d76509a8ca10%40googlegroups.com https://groups.google.com/d/msgid/elasticsearch/03be8ad7-40cf-4442-ad39-d76509a8ca10%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com mailto:elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6a8d402d-d2c7-4fed-8704-9b5e1be1a0fd%40googlegroups.com https://groups.google.com/d/msgid/elasticsearch/6a8d402d-d2c7-4fed-8704-9b5e1be1a0fd%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/A6A77B32-D3AF-47E3-8986-11A56A8286E0%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.