跳至内容

How can I find out why my client is being throttled when subscribing in mqtt?

0

I have recently begun to see subscribe requests fail with reason "throttled" in the aws iot logs in cloudwatch.

I'm unsure what is causing this or why and need to find out immediately!

How can I learn what the cause for throttling is so I can quickly resolve it?

On that note it would be nice if AWS returned the specific reason instead of the generic "throttled" in the logs!

Example log:

{
    "timestamp": "2023-08-08 22:43:33.727",
    "logLevel": "ERROR",
    "traceId": "X",
    "accountId": "X",
    "status": "Failure",
    "eventType": "Subscribe",
    "protocol": "MQTT",
    "topicName": "users/X/status",
    "clientId": "<clientId>",
    "principalId": "USER",
    "sourceIp": "X",
    "sourcePort": X,
    "reason": "throttled"
}

已提问 3 年前1256 查看次数

1 回答
0

Hi borg. Is it intermittent? I see from your question history that this is probably a chat application? How many clients?

Please also check your CloudWatch metrics. The .Throttle metrics will only exist if you have indeed exceeded that particular quota at some point. Description of metrics here: https://docs.aws.amazon.com/iot/latest/developerguide/metrics_dimensions.html#message-broker-metrics

From the error you've shared, I'm not certain which quota you've exceeded, but please be aware of these limits: https://docs.aws.amazon.com/general/latest/gr/iot-core.html#message-broker-limits

Enter image description here

Enter image description here

And there are other subscription limits if you use shared subscriptions at all.

AWS
专家

已回答 3 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。