Use Integer.valueOf(int) factory method instead of new Integer(int) constructor
to take advantage of caching.
This is especially useful when creating millions of
ReceiveMessageRequests with the same options.
Adds long polling support to receive message requests.
The option 'wait-time-seconds' has been added to the 'receive' function.
This option behaves exactly the same as the 'WaitTimeSeconds' parameter
of the ReceiveMessageRequest class in the AWS Java SDK.
The following text is shamelessly taken from the (docs
http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html):
Long polling allows the Amazon SQS service to wait until a message is
available in the queue before sending a response. This helps reduce the
amount of empty responses, thus reducing costs.
Another benefit is reducing the false empty reponses, where messages are
available in the queue but are not included in the response.
This happens when Amazon SQS uses short (standard) polling, the default
behavior, where only a subset of the servers (based on a weighted random
distribution) are queried to see if any messages are available to
include in the response. On the other hand, when long polling is
enabled, Amazon SQS queries all of the servers.