简体   繁体   English

SQS 最大机上消息计数低于文档说明

[英]SQS maximum inflight message count is lower than documentation says

According to the SQS documentation , the maximum number of inflight messages is set to 120,000 for standard queues.根据SQS 文档,标准队列的最大传输消息数设置为 120,000。 However, sometimes I see my queues maxing out at lower numbers, such as here:但是,有时我会看到我的队列以较低的数字达到最大值,例如: 最大机上消息为 100K

Does anyone know why this might be the case?有谁知道为什么会这样? I have code that dynamically changes the number of SQS listeners depending on the number of messages in the queue, but I don't want to do anything if I've hit the maximum.我有代码可以根据队列中的消息数量动态更改 SQS 侦听器的数量,但是如果达到最大值,我不想做任何事情。 My problem is now that the max limit doesn't seem to be consistent.我现在的问题是最大限制似乎不一致。 Some queues go to 120K, but this one is stuck at 100K instead, and as far as I can tell there is no setting that allows me to set this limit.有些队列达到 120K,但这个队列停留在 100K,据我所知,没有任何设置允许我设置此限制。

approximateNumberOfMessagesNotVisible indicates the number of messages in-flight, as you are rightly said.正如您所说的那样, approximateNumberOfMessagesNotVisible表示正在传输的消息数。 It depends on how many consumers you have, and what is througput of each consumer.这取决于您有多少消费者,以及每个消费者的吞吐量是多少。

If the actual number is caping at 100k, then your consumers are swamped and have no more receiving capacity.如果实际数字上限为 10 万,那么您的消费者将被淹没并且没有更多的接收能力。

Anyways, it's better if you provide more info on the use-case as 100k in-flight messages look out of ordinary and you may be not using correct solution for your problem.无论如何,如果您提供有关用例的更多信息会更好,因为 10 万条正在传输的消息看起来不寻常,并且您可能没有使用正确的解决方案来解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM