我正在使用代码片段将消息发送到服务总线主题。
try
{
// sb is instance of ServiceBusConfig.GetServiceBusForChannel
await sb.SendAsync(message);
}
catch (Exception ex)
{
this.logger.LogError(
"chanel",
"An error occurred while sending a notification: " + ex.Message,
ex);
throw;
}
和实施是
public async Task SendAsync(BrokeredMessage message)
{
if (this.topicClient == null)
{
this.topicClient = TopicClient.CreateFromConnectionString(this.primaryConnectionString, this.topicPath);
this.topicClient.RetryPolicy = this.retryPolicy;
}
await this.topicClient.SendAsync(message);
}
错误:-
"ErrorCode,12005,Message,""发送通知时出错:操作未在分配的 00:01:00 超时内完成。分配给此操作的时间可能是较长超时的一部分。对于有关异常类型和正确异常处理的更多信息,Exception,""Microsoft.ServiceBus.Messaging.MessagingException:操作未在分配的 00:01:00 超时内完成。分配给此操作的时间可能是更长的超时时间。
有关异常类型和正确异常处理的更多信息