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 Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...