maheshwarirohit87 / typica

Automatically exported from code.google.com/p/typica
Apache License 2.0
0 stars 0 forks source link

connection timeout #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Couldn't find the api to set connection timeout while connecting to a 
queue.
if the network connection breaks how long it will keep trying to make 
connection ?

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by anshu.mi...@gmail.com on 13 May 2009 at 3:25

GoogleCodeExporter commented 9 years ago
While debugging you may try to let the first call happen.
MessageQueue msgQueue = SQSUtils.connectToQueue(amazonQueueName, accessKey, 
secretKey);

Remove your network cable...
String msgId = msgQueue.sendMessage(encryptedEmailAddress);

The above line takes forever to return any exception. Is there something where I
could set the timeout for this operation ?

Original comment by anshu.mi...@gmail.com on 13 May 2009 at 1:30

GoogleCodeExporter commented 9 years ago
Probably this should work, as it did with my testprogram.

com.xerox.amazonws.sqs2.MessageQueue

Add this line after line 131. i.e. PostMethod method = new PostMethod();
method.getParams().setSoTimeout(YOUR_TIMEOUT_PERIOD);

Ideally, the API should expose this. If i have missed something, let me know.

Original comment by anshu.mi...@gmail.com on 13 May 2009 at 4:05

GoogleCodeExporter commented 9 years ago
Also add 
hc.setConnectionTimeout(1000);
in AWSQueryConnection.java

Original comment by anshu.mi...@gmail.com on 21 May 2009 at 8:06

GoogleCodeExporter commented 9 years ago
It would be nice to have this configurable - perhaps defaulting to a system 
property,
since it affects calls by both QueueService and MessageQueue.

Original comment by scott.re...@gmail.com on 27 May 2009 at 9:12

GoogleCodeExporter commented 9 years ago
I totally agree. For the time being I have fixed it locally, as shown above . 
It would be nice if someone here, 
could add this as a config paramter and expose it through some API.

Original comment by anshu.mi...@gmail.com on 27 May 2009 at 9:18

GoogleCodeExporter commented 9 years ago
I just submitted a patch today that exposes all three timeouts used by 
HttpClient:
connectionManagerTimeout, soTimeout, and connectionTimeout. See thread here:
http://groups.google.com/group/typica/browse_thread/thread/3b5d90a0b51fa43e

Original comment by scott.re...@gmail.com on 2 Jun 2009 at 3:09

GoogleCodeExporter commented 9 years ago
I applied that patch some weeks back. It should be in the 1.6 release.

Original comment by dkavan...@gmail.com on 16 Aug 2009 at 1:47