Reuse NodeClient inside prepareRequest plugin method


Is it possible to reuse NodeClient inside prepareRequest plugin method? I want to pin it inside my native code. Will it be safe to use it across multiple threads inside jni or I should every time use new provided client?

Yep, the NodeClient (and TransportClient) is thread safe, so you can share it between multiple threads. That's the preferred way, to reduce overhead and chattiness with the cluster.


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.