Use `threading.Condition` instead of `sleep()` to prevent high cpu usage while SQS long polling on an empty queue.
Ref: #871
Ref: #1916
Co-authored-by: Brian Pandola <bpandola@gmail.com>
- Support for delaying messages
- Support for visibility timeouts
- Support for actually deleting messages
- Support for message bodies longer than 27 characters
- Support for message attributes
- Support for accurate queue attributes
Caveats:
- All message attributes are returned regardless of whether or not
attributes were requested when reading messages
- I’m not sure why messages longer than 27 characters were breaking in
my tests. Boto seems to expect the body to be base64 encoded and bodies
less than 27 characters would be fine, but if I attempted to use a
larger body it would mangle the content. I now base64 encode the body
if the raw string is longer than 27 characters and all is fine.