Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support for long polling appears broken #78
Hello. My server is using a the SQS long polling mechanism by using the following
ReceiveMessageRequest rmr = new ReceiveMessageRequest() .withMaxNumberOfMessages(10) .withWaitTimeSeconds(20) .withQueueUrl(scanQueueUrl); ReceiveMessageResult rx = sqs.receiveMessage(rmr);
However when doing this elesticmq throws a timeout exception instead of just returning no messages. The error is as follows
Notice that the time seconds in the exception is 20 + 1 extra second.
After looking into this further. This issue is 100% my fault. What was happening is that I was stopping elasticmq while a long polling request was in progress. So since the queue was stopped from underneath it, the polling request threw the exception.
I'm not sure what the proper behavior should be here. Possibly the server waiting for all requests to finish before shutting down. Either way it is easily remedied on my side so its not that important.
Sorry for the bug