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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...