I am using solrj in my java client to talk to the solr servers. I want the solr query to timeout if I dont get the complete response within X amount of time. In other words, I dont want my thread to wait indefinitely for the response and I want a TimeoutException if solr response takes longer than X amount of time.
I looked at the the two options : 1. connectionTimeout and 2. socketTimeout. But I am afraid socketConnectionTimeout might not work for me. For instance, if my network is too slow for example, then there would be communication on the established connection and socketTimeOut might not happen, if I understand it right. Does someone have any advice on whats the best way to implement this? Thanks, Karthick