![](/img/trans.png)
[英]Microsoft ServiceBus Receiving BrokeredMessages Out of Order
[英]Microsoft.ServiceBus.InvalidRequestException: The connection was failed. Cache refresh timed out
Microsoft.ServiceBus.InvalidRequestException:連接失敗。 高速緩存刷新超時。 服務器堆棧跟蹤:在Microsoft.ServiceBus.Channels.BufferedConnectionInitiator.Connect(Uri uri,TimeSpan超時)在Microsoft.ServiceBus.ConnectivityModeConnectionInitiator.Connect(Uri uri,TimeSpan超時)在Microsoft.ServiceBus.RelayedSocketInitiator.Connect(Uri uri,TimeSpan超時) )的Microsoft.ServiceBus.Channels.ConnectionPoolHelper。EstablishmentConnection(TimeSpan超時)處的System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan超時)的System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan超時)的System.ServiceModel.Channels。 System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan超時)在System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan超時)處的CommunicationObject.Open(TimeSpan超時)在[0]處引發了異常:在System.Runtime.Remoting.Proxies處Syst處的System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&msgData,Int32類型)的.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg) em.ServiceModel.ICommunicationObject.Open()
使用NetTcpRelayBinding打開連接時
try
{
NetTcpRelayBinding netTcpRelay = new NetTcpRelayBinding();
if (ApplicationServer.Common.Utilities.ServicesConfigurationManager.ClientMaxConnections > 0)
{
netTcpRelay.MaxConnections = ApplicationServer.Common.Utilities.ServicesConfigurationManager.ClientMaxConnections;
}
netTcpRelay.MaxReceivedMessageSize = ApplicationServer.Common.Utilities.ServicesConfigurationManager.ClientMaxReceivedMessageSize;
if (ApplicationServer.Common.Utilities.ServicesConfigurationManager.ClientSendTimeout > 0)
{
netTcpRelay.SendTimeout = new TimeSpan(0, 0, ApplicationServer.Common.Utilities.ServicesConfigurationManager.ClientSendTimeout);
}
if (ApplicationServer.Common.Utilities.ServicesConfigurationManager.ClientReceiveTimeout > 0)
{
netTcpRelay.ReceiveTimeout = new TimeSpan(0, 0, ApplicationServer.Common.Utilities.ServicesConfigurationManager.ClientReceiveTimeout);
}
channelFactory = new ChannelFactory<TServiceChannel>(
netTcpRelay,
new EndpointAddress(serviceBusUri));
// Set the signature token
policyName = ...
accessKey = ...
channelFactory.Endpoint.Behaviors.Add(new TransportClientEndpointBehavior { TokenProvider = TokenProvider.CreateSharedAccessSignatureTokenProvider(policyName, accessKey) });
}
catch (Exception exc)
{
throw new ServiceBusRelayException("\nServiceBusRelayProxyHelper.Initialize (sb://): An error ocurred with ServiceBusUri='" + serviceBusUri + "' - PolicyName='"+ policyName +"'.\nException Message: " + exc.Message, exc);
}
從今天開始,我也遇到了同樣的問題。 這不是您的代碼的問題,我必須與MSFT支持一起工作才能解決問題。 他們不得不將我的服務總線名稱空間移到另一個節點,然后解決了這個問題。 我建議在Azure支持下打開支持通知單。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.