[英]Slow deleting message from AWS SQS queue
Problem:问题:
I have SQS queue with default settings.
我有默认设置的 SQS 队列。
9 consumers pulling messages, with concurrency: 100. As a result, 90% time all work with massage, was spent on removing it from the SQS. 9 个消费者拉取消息,并发数:100。因此,90% 的时间都用于处理消息,用于将其从 SQS 中删除。 There are 2 million messages in queue sometimes.
有时队列中有 200 万条消息。
info - TIME all58189132: 7s 25.336044ms info - TIME delMessage58189132: 7s 3.667635ms
信息-TIME all58189132:7s 25.336044ms 信息-TIME delMessage58189132:7s 3.667635ms
info - TIME all58189132: 7s 25.336044ms info - TIME delMessage90392602: 6s 943.837946ms
信息-TIME all58189132:7s 25.336044ms 信息-TIME delMessage90392602:6s 943.837946ms
info - TIME all90392602: 6s 966.396512ms info - TIME delMessage90392602: 6s 943.837946ms
信息-TIME all90392602:6s 966.396512ms 信息-TIME delMessage90392602:6s 943.837946ms
How can i do it faster?我怎样才能做得更快?
Basically message-based flow is:基本上基于消息的流程是:
You have to do all of the above steps.您必须完成上述所有步骤。 You can not skip any one step.
您不能跳过任何一步。 Simply you need to increase the number of consumers.
您只需要增加消费者的数量。
Note: Increase consumers only when you cannot afford this much execution time.注意:仅当您无法承受如此多的执行时间时才增加消费者。 Else, let them take whatever time they are taking.
否则,让他们慢慢来。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.