Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send message to azure queue Microsoft.ServiceBus.Messaging.MessagingEntityNotFoundException

I'm trying to follow along with this tutorial https://azure.microsoft.com/en-us/documentation/articles/service-bus-dotnet-multi-tier-app-using-service-bus-queues/ on azure queues but I opted for using an MVC app instead of the web role. I have everything working up to step 9 of the create a web role where it says you should now be able to hit submit and watch the message count increase of your queue on page.

Instead I get An exception of type 'Microsoft.ServiceBus.Messaging.MessagingEntityNotFoundException' occurred in Microsoft.ServiceBus.dll but was not handled in user code

Additional information: 40400: Endpoint not found.

on the step 8 line when it send the message to the queue. It detects the queue as being there or it wouldn't skip over the check for is it created so I have to think it's some kind of access issue.

Can someone please assist me?

like image 410
helpdevelop Avatar asked Aug 24 '15 07:08

helpdevelop


People also ask

How do I send and receive messages from Azure Service Bus queue?

Create a Service Bus namespace, using the Azure portal. Create a Service Bus Messaging queue, using the Azure portal. Write a console application to send a message. Write a console application to receive messages.

How do you send a message to the dead-letter queue in Azure?

Go to the queues overview in the Azure portal and enable dead-lettering on message expiration on your subscription/queue. Set TimeToLive on your message to say few seconds. (I did while creating a test queue, in the creation it is simple) Push the message to your subscription.


1 Answers

So funny enough I had all the code correct as per the tutorial but after checking the error definition metadata it says that entity not found usually means it can't find the queue. So as a shot in the dark I looked at this line

OrdersQueueClient = messagingFactory.CreateQueueClient( "OrdersQueue");

and guessed that maybe the OrdersQueue was actually supposed to match the name of my queue which I overlooked during my first go through. So if you get entity not found make sure you check your connection string and queue name in the azure portal. Hope this is helpful.

like image 60
helpdevelop Avatar answered Oct 06 '22 01:10

helpdevelop