似乎新的 azure SDK 将可见性超时延长到 <= 7 天。我知道默认情况下,当我将消息添加到 azure 队列时,实时时间是 7 天。当我收到消息时,将可见性超时设置为 7 天。这是否意味着如果我不关心消息的可靠性,我不需要删除此消息?该消息将在 7 天后消失。
我想采用这种方式,因为 DeleteMessage 很慢。如果我不删除消息,它对GetMessage的性能没有任何影响吗?
似乎新的 azure SDK 将可见性超时延长到 <= 7 天。我知道默认情况下,当我将消息添加到 azure 队列时,实时时间是 7 天。当我收到消息时,将可见性超时设置为 7 天。这是否意味着如果我不关心消息的可靠性,我不需要删除此消息?该消息将在 7 天后消失。
我想采用这种方式,因为 DeleteMessage 很慢。如果我不删除消息,它对GetMessage的性能没有任何影响吗?
根据 的文档Get Messages
,我相信当然可以将VisibilityTimeout
期限设置为 7 天,以便只获取一次消息。但是,我发现这种方法存在一些问题,而不是在流程完成后仅删除消息:
Approximate Messages Count
队列的属性来检查由队列中的消息执行的进程的健康状况。请注意,即使您将消息隐藏,它仍然存在于队列中,因此将包含在队列中的消息总数中。因此,如果您正在构建一个依赖于此进行健康检查的系统,您将始终发现您的系统不健康,因为您永远不会删除消息。我很想知道为什么您发现删除消息非常慢。以我的经验,这是相当快的。您如何监控消息删除?
Rather than hacking around the problem I think you should drill into understanding why the deletes are slow. Have you enabled logs and looked at the e2elatency and serverlatency numbers across all your queue operations. Ideally you shouldn't be seeing a large difference between the two for all your queue operations. If you do see a large difference then it implies something is happening on the client that you should investigate further.
For more information on logging take a look at the following articles: http://blogs.msdn.com/b/windowsazurestorage/archive/tags/analytics+2d00+logging+_2600_amp_3b00_+metrics/ http://msdn.microsoft.com/en-us/library/azure/hh343262.aspx
Information on client side logging can also be found in this post: e client side logging – which you can learn more about in this blog post. http://blogs.msdn.com/b/windowsazurestorage/archive/2013/09/07/announcing-storage-client-library-2-1-rtm.aspx
Please let me know what you find.
Jason