SQS Extended - 输入收据句柄无效

时间:2017-02-09 21:16:19

标签: amazon-s3 aws-sdk amazon-sqs

我们使用扩展功能包装了现有队列。消息可以放在队列中,我们看到消息体存储在S3上。

但是,当消息被消耗时,我们得到以下堆栈跟踪:

com.amazonaws.services.sqs.model.ReceiptHandleIsInvalidException: The input receipt handle is invalid. (Service: AmazonSQS; Status Code: 404; Error Code: ReceiptHandleIsInvalid; Request ID: ba9421e9-a9d2-56ba-8e17-70ff7190f05a)
                        at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:1182)
                        at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:770)
                        at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:489)
                        at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:310)
                        at com.amazonaws.services.sqs.AmazonSQSClient.invoke(AmazonSQSClient.java:2419)
                        at com.amazonaws.services.sqs.AmazonSQSClient.changeMessageVisibility(AmazonSQSClient.java:485)
                        at com.amazonaws.services.sqs.AmazonSQSClient.changeMessageVisibility(AmazonSQSClient.java:1692)
                        at com.amazon.sqs.javamessaging.AmazonSQSExtendedClientBase.changeMessageVisibility(AmazonSQSExtendedClientBase.java:1376)

当我们尝试更改可见性时会发生这种情况。这不受支持吗?

                    sqsExtended.changeMessageVisibility(queueUrl, message.getReceiptHandle(), visibilityTimeout);

1 个答案:

答案 0 :(得分:0)

答案是这还没有实现,也没有尝试通过在调用方法时抛出异常来警告你。似乎没有理由不实施,查看源代码,这将是直截了当的。

对于我们的情况,我们可以转发此参数的队列默认值,而不是单独设置每个值。