【问题标题】:The operation did not complete within the allotted timeout of 00:01:00操作未在分配的 00:01:00 超时内完成
【发布时间】: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


【解决方案1】:

这种情况偶尔会发生。 Azure 可以随意更改和转移其底层硬件。这类错误时不时会出现。只要您在适当的地方有一些适当的重试逻辑,消息最终会通过......

【讨论】:

    猜你喜欢
    • 2012-07-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-17
    • 2012-12-29
    • 2019-12-01
    • 2012-03-14
    相关资源
    最近更新 更多