8

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;
        }

and implementation is

    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);
    }

Error:-

"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

Thomas
  • 1,445
  • 14
  • 30
Sudhir Goswami
  • 125
  • 1
  • 9
  • You are sure you are sending the message to the right service and that the service is accepting messages from outside? –  Jul 29 '16 at 07:43
  • yes.. this issue is happens sometimes not daily. – Sudhir Goswami Jul 29 '16 at 07:46
  • Does the message sometimes exceed the limit of 256KB ? –  Jul 29 '16 at 07:55
  • we are already validating size It won't accept more than 256 KB. It will through error message. – Sudhir Goswami Jul 29 '16 at 08:35
  • can anybody tell how to reproduce the issue? – Sudhir Goswami Aug 01 '16 at 06:53
  • What kind of volume do you have? Do you see any other error messages leading up to this? – JTaub Aug 01 '16 at 20:52
  • We started seeing the same issue, did you find a solution? Is there a way to increase the timeout? @SudhirGoswami – MBen Mar 24 '17 at 15:35
  • Same here. We had an AZURE function running successfully, taking around 400k ms and then I changed the implementation and now this exception pops at around 200k ms. So I think it is not related to the function timeout but to a kind of operation timeout within the function. – Noel Widmer Dec 27 '17 at 14:09

1 Answers1

1

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 ...

Stefan Zvonar
  • 3,959
  • 3
  • 24
  • 30