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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...