Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Getting a "Microsoft.Azure.ServiceBus.ServiceBusCommunicationException" when writing a simple test

$
0
0

Hello,

I am trying to reproduce the simple example explained here about the use of Service Bus: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dotnet-get-started-with-queues

However, I am getting the following exception

Exception thrown: 'Microsoft.Azure.ServiceBus.ServiceBusCommunicationException' in System.Private.CoreLib.dll

with the message:

Exception: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond ErrorCode: TimedOut
 Stack Trace:    at Microsoft.Azure.ServiceBus.Core.MessageSender.OnSendAsync(IList`1 messageList) in C:\source\azure-service-bus-dotnet\src\Microsoft.Azure.ServiceBus\Core\MessageSender.cs:line 562
   at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func`1 operation, TimeSpan operationTimeout) in C:\source\azure-service-bus-dotnet\src\Microsoft.Azure.ServiceBus\RetryPolicy.cs:line 85
   at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func`1 operation, TimeSpan operationTimeout) in C:\source\azure-service-bus-dotnet\src\Microsoft.Azure.ServiceBus\RetryPolicy.cs:line 107
   at Microsoft.Azure.ServiceBus.Core.MessageSender.SendAsync(IList`1 messageList) in C:\source\azure-service-bus-dotnet\src\Microsoft.Azure.ServiceBus\Core\MessageSender.cs:line 252
   at ServiceBusHelloWorld.Program.SendMessagesAsync(Int32 numberOfMessagesToSend) in C:\_dev\ServiceBusHelloWorld\ServiceBusHelloWorld\ServiceBusHelloWorld\Program.cs:line 58

in this line (SendMessagesAsync() method):

// Send the message to the queue
await queueClient.SendAsync(message);


Could it be an non-open ports issue? If so, what port should be used to handle the ServiceBus' response?


Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>