【发布时间】:2016-12-03 20:02:30
【问题描述】:
我正在使用代码 sn-p 将消息发送到服务总线主题。
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 超时。分配给此操作的时间可能有 是较长超时的一部分。有关异常的更多信息 类型和适当的异常处理, 异常,""Microsoft.ServiceBus.Messaging.MessagingException: 操作未在分配的 00:01:00 超时内完成。 分配给此操作的时间可能是 更长的超时时间。
有关异常类型和正确异常处理的更多信息
【问题讨论】:
-
您确定将消息发送到正确的服务并且该服务正在接受来自外部的消息?
-
是的..这个问题有时不是每天都会发生。
-
邮件是否有时会超过 256KB 的限制?
-
我们已经在验证大小它不会接受超过 256 KB。它将通过错误消息。
-
谁能告诉我如何重现这个问题?
标签: c# azure asp.net-web-api azureservicebus azure-servicebus-topics