简体   繁体   English

Azure Service Bus SDK / NuGet中的serverWaitTime和operationTimeout之间的差异

[英]Difference between serverWaitTime and operationTimeout in Azure Service Bus SDK/NuGet

I am trying to understand the difference between: 我试图了解之间的区别:

  1. serverWaitTime (in ISessionClient.AcceptMessageSessionAsync(String, TimeSpan)) ( https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.servicebus.isessionclient.acceptmessagesessionasync?view=azure-dotnet#Microsoft_Azure_ServiceBus_ISessionClient_AcceptMessageSessionAsync_System_String_System_TimeSpan_ ) and serverWaitTime(在ISessionClient.AcceptMessageSessionAsync(String,TimeSpan)中)( https://docs.microsoft.com/zh-cn/dotnet/api/microsoft.azure.servicebus.isessionclient.acceptmessagesessionasync?view=azure-dotnet#Microsoft_Azure_ServiceBus_ISessionClient_AcceptMessageSessionAsync_Time_System_String
  2. operationTimeout (in IMessageReceiver.ReceiveAsync(TimeSpan)) ( https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.servicebus.core.imessagereceiver.receiveasync?view=azure-dotnet#Microsoft_Azure_ServiceBus_Core_IMessageReceiver_ReceiveAsync_System_TimeSpan_ ) in Azure Service Bus SDK. operationTimeout(在IMessageReceiver.ReceiveAsync(TimeSpan)中)( https://docs.microsoft.com/zh-cn/dotnet/api/microsoft.azure.servicebus.core.imessagereceiver.receiveasync?view=azure-dotnet#Microsoft_Azure_ServiceBus_Core_IMessageReceiver_ReceiveAsync_System_TimeS Azure Service Bus SDK。

The documentation provides following text on both: 该文档提供了以下两种内容:

  1. serverWaitTime: Amount of time for which the call should wait for to fetch the next session. serverWaitTime:调用应等待获取下一个会话的时间。
  2. operationTimeout: The time span the client waits for receiving a message before it times out. operationTimeout:客户端在超时之前等待接收消息的时间。

In my experimental code, ISessionClient.AcceptMessageSessionAsync(session, serverWaitTime) seem to return immediately (even when large number of sessions are being created) where as IMessageReceiver.ReceiveAsync will definitely wait for supplied operationTimeout before timing out if the message with that session is not available. 在我的实验代码中,ISessionClient.AcceptMessageSessionAsync(session,serverWaitTime)似乎立即返回(即使正在创建大量会话时),其中IMessageReceiver.ReceiveAsync肯定会等待提供的operationTimeout,然后再超时(如果没有该会话的消息)可用。

Hence I am wondering if serverWaitTime means something else that I do not understand. 因此,我想知道serverWaitTime是否意味着我不理解的其他内容。

  1. Are both related to client side timeouts only? 两者都只与客户端超时有关吗?
  2. If that is true, then why call one serverWaitTime vs operationTimeout? 如果是这样,那为什么还要调用一个serverWaitTime vs operationTimeout?

Both serverWaitTime and operationTimeout parameters represent the same concept - wait time for the client before it gives up. serverWaitTimeoperationTimeout参数代表相同的概念-等待客户端放弃之前的时间。

As for the reason they are called differently, that's a question for the team to be raised in the issue tarcker . 由于他们被不同地称呼的原因,这是团队在问题tarcker中提出的一个问题

The session client has operation timeout that let's one define a timeout period for all sessions. 会话客户端具有操作超时,我们可以为所有会话定义超时期限。

Each individual session via AcceptMessageSessionAsync can override that value by supplying the server wait time. 通过AcceptMessageSessionAsync的每个会话都可以通过提供服务器等待时间来覆盖该值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为Service Bus worker角色设置OperationTimeOut属性 - Setting the OperationTimeOut property for a Service bus worker role WCF中OperationTimeout和SendTimeout的区别 - Difference between OperationTimeout and SendTimeout in WCF Azure 服务总线上的主题 DefaultMessageTimeToLive 和订阅 DefaultMessageTimeToLive 之间的区别 - Difference between Topic DefaultMessageTimeToLive and Subscription DefaultMessageTimeToLive on Azure Service Bus 无法安装Windows Azure Service Bus nuget程序包 - Can't install Windows Azure Service Bus nuget package 使用存储队列和服务总线时,Azure 死信队列和毒药队列有什么区别? - What is the difference between Azure Dead Letter Queues and Poison Queues when using Storage Queue and Service Bus? Azure 服务总线使用 .net sdk 按 ID 删除队列消息 - Azure service bus delete queue message by id using the .net sdk Azure 服务总线新 SDK 缺少自定义属性(用户属性) - Azure Service Bus new SDK missing custom properties (user properties) 如何重定向.nuget文件夹? 和nuget包与SDK nuget包的区别 - How to redirect .nuget folder? and Difference between nuget package and SDK nuget Package Azure服务总线AutoDeleteOnIdle - Azure Service Bus AutoDeleteOnIdle Azure服务总线队列 - Azure Service Bus Queue
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM