azure - 远程服务器返回错误: (404) Not Found While deleting message from queue

标签 azure azure-storage

我们使用 Azure 队列进行打印作业,但是当通过 queue.DeleteMessage(message) 从队列中删除消息时,该方法会引发以下异常。

远程服务器返回错误:(404) 未找到

上述异常已处理,但仍在寻找解决方法。

任何人都可以建议如何修复它。

谢谢, 斯内赫

最佳答案

根据this article ,我们可以发现:

After a client retrieves a message with the Get Messages operation, the client is expected to process and delete the message. To delete the message, you must have two items of data returned in the response body of the Get Messages operation:

  • The message ID, an opaque GUID value that identifies the message in the queue.
  • A valid pop receipt, an opaque value that indicates that the message has been retrieved.

如果未找到具有匹配弹出收据的消息,服务将返回错误代码 404(未找到)。并且 Pop 收据保持有效,直到发生以下事件之一:

  1. The message has expired.
  2. The message has been deleted using the last pop receipt received either from Get Messages or Update Message.
  3. The invisibility timeout has elapsed and the message has been dequeued by a Get Messages request. When the invisibility timeout elapses, the message becomes visible again. If it is retrieved by another Get Messages request, the returned pop receipt can be used to delete or update the message.
  4. The message has been updated with a new visibility timeout. When the message is updated, a new pop receipt will be returned.

关于azure - 远程服务器返回错误: (404) Not Found While deleting message from queue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45097796/

相关文章:

sql-server - 如何查看Azure SQL Server实例中授予任何数据库用户的角色和权限?

django - Docker Compose 对 ECS 和 ACI 的集成将于 2023 年 11 月停用

asp.net - 为什么 Html.DisplayFor 和 .ToString ("C2") 不尊重 CurrentUICulture?

Azure 存储表权限

azure - Windows Azure 和 WCF 数据服务 V3

azure - 同步两个 azure 虚拟机时要排除哪些文件?

azure - 如何从 Azure AD B2C 身份验证获取电子邮件地址?

azure - 了解/限制 Azure Web 应用程序权限

java - 无法使用azure的java api下载PDF文件

每个租户的 Azure 存储 Blob/文件