Singleton is the way to go. Node and Client is thread safe.

-- 
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr


Le 8 avril 2014 à 10:49:59, Subhadip Bagui (i.ba...@gmail.com) a écrit:

Hi David,

I'm trying to store all cloud event related data like create node, delete node 
etc. in ES. So whenever a new event occurs I'm creating a new node and client, 
doing the indexing and then closing the node.

As you said, should I use same node created and use that in all occurence? like 
using a singleton? or can I create node every time with same name and close it 
after ES operation done? Pls suggest.

Thanks.
Subhadip
--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/1c2eba75-2653-48a5-9906-9b72b156d64f%40googlegroups.com.
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/etPan.5343b905.431bd7b7.164d%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.

Reply via email to