Reuse NodeClient inside prepareRequest plugin method

Hi!

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.

Thanks!

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