Splunk Dev

Is com.splunk.Service thread safe?

GoodBobK
Engager

Hello,

When using Splunk JAVA SDK, is it safe to create a single com.splunk.Service object and the use it to run multiple searches simultaneously from a number of separate threads? If yes, can search executed in one thread block searches from other threads from executing (apart from limits on number of searches per user imposed by server) or "break" the Connection object in some other way (for example, by uncommanded logout from server)?

Tags (2)

yarick
Path Finder

The new Service object seems to run as many searches as your quota allows. I have not seen a need to establish new connection for each thread. What version SDK / Splunk are you using ? Post your specific error, if got one.

0 Karma

splunkbc100
New Member

Did anybody answer you on this? I'm trying to ask the same question, which I probably already know since I'm here...:) Anyway, I'm using a new Service class for each thread, but still no luck it starts to hang after running for little bit...Let me know if you found a solution..

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...