

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 對 Amazon SQS 中的 FIFO 限流問題進行故障診斷
<a name="troubleshooting-fifo-throttling-issues"></a>

根據預設，FIFO 佇列支援 [`SendMessage`](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html)、 [`ReceiveMessage`](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_ReceiveMessage.html)和 的每個 API 動作每秒 300 個交易[`DeleteMessage`](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_DeleteMessage.html)。即使佇列中的訊息可用，超過 300 TPS 的請求也會收到`ThrottlingException`錯誤。若要緩解這種情況，您可以使用下列方法：
+ [在 Amazon SQS 中啟用 FIFO 佇列的高輸送量](enable-high-throughput-fifo.md).
+ 使用 Amazon SQS API 批次動作 `SendMessageBatch`、 `DeleteMessageBatch`和 `ChangeMessageVisibilityBatch` ，提高每個 API 動作每秒最多 3，000 則訊息的 TPS 限制，並降低成本。針對 `ReceiveMessage` API，將 `MaxNumberofMessages` 參數設定為每次交易最多接收十則訊息。如需詳細資訊，請參閱[Amazon SQS 批次動作](sqs-batch-api-actions.md)。
+ 對於具有高輸送量的 FIFO 佇列，請遵循建議來[最佳化分割區使用率](high-throughput-fifo.md#data-distribution-partition-limitations)。批次傳送具有相同訊息群組 IDs的訊息。刪除訊息，或使用來自相同 `ReceiveMessage` API 請求的接收控點批次變更訊息可見性逾時值。
+ 增加唯一[`MessageGroupId`](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html#SQS-SendMessage-request-MessageGroupId)值的數量。這允許跨 FIFO 佇列分割區均勻分佈。如需詳細資訊，請參閱使用 Amazon SQS 訊息群組 ID。

如需詳細資訊，請參閱 *AWS 知識中心指南*中的[為什麼我的 Amazon SQS FIFO 佇列不會傳回其他訊息群組中的所有訊息或訊息？](https://repost.aws/knowledge-center/sqs-fifo-messages-not-returned)。