gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 01:47:03 36 4
gpt4 key购买 nike

我们使用 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/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com