amazon-sqs

How to get all messages in Amazon SQS queue using boto library in Python?

江枫思渺然 提交于 2020-08-22 04:20:13
问题 I'm working on an application whose workflow is managed by passing messages in SQS, using boto. My SQS queue is growing gradually, and I have no way to check how many elements it is supposed to contain. Now I have a daemon that periodically polls the queue, and checks if i have a fixed-size set of elements. For example, consider the following "queue": q = ["msg1_comp1", "msg2_comp1", "msg1_comp2", "msg3_comp1", "msg2_comp2"] Now I want to check if I have "msg1_comp1", "msg2_comp1" and "msg3