在指定的00:01:00超时内操作未完成 [英] The operation did not complete within the allotted timeout of 00:01:00

查看:208
本文介绍了在指定的00:01:00超时内操作未完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用代码段将消息发送到服务总线主题中.

I am using code snippet to send message into the service bus topic.

        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超时内操作未完成. 分配给此操作的时间可能是 超时时间更长.

"ErrorCode,12005,Message,""An error occurred while sending a notification: The operation did not complete within the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout. For more information on exception types and proper exception handling, Exception,""Microsoft.ServiceBus.Messaging.MessagingException: The operation did not complete within the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout.

有关异常类型和适当的异常处理的更多信息

For more information on exception types and proper exception handling

推荐答案

这偶尔会发生. Azure可以毫不费力地更改和更改其基础硬件.这类错误有时会弹出.只要您在适当的地方有一些适当的重试逻辑,该消息最终就会通过...

This happens occasionally. Azure can change and shift their underlying hardware willy nilly. These sort of errors pop up every now and then. As long you have some appropriate retry logic where appropriate, the message will eventually get through ...

这篇关于在指定的00:01:00超时内操作未完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆