0

I'm working through a basic tutorial on the ServiceBus. A web role adds objects to a ServiceBus Queue, while a worker role reads those messages off the queue and marks them complete. This is all within the local environment (compute emulator).

It seems like it should be incredibly simple, but I'm seeing the following behavior:

  1. The call QueueClient.Receive() is always timing out.
  2. Some messages are just hanging out in the queue and are not being picked up by the worker.

What could be going on? How can I debug the state of these messages?

roufamatic
  • 18,187
  • 7
  • 57
  • 86

2 Answers2

0

First of all, please make sure you indeed have some messages in the queue. I would like to suggest you to run the end solution of this tutorial: http://msdn.microsoft.com/en-us/WAZPlatformTrainingCourse_ServiceBusMessaging. If that works fine, please compare your code with the sample code. If that doesn’t work as well, it is likely to be a configuration issue or a network issue. Then I would recommend you to check whether you have properly configured the Service Bus account, and check if you’re able to access internet from your machine.

Best Regards,

Ming Xu.

roufamatic
  • 18,187
  • 7
  • 57
  • 86
Ming Xu - MSFT
  • 2,116
  • 1
  • 11
  • 13
0

You can check the length of the Queue (from the portal or looking at the MessageCount property).

Another possibility is that the messages are DeadLettered. You can read from the DeadLettered subqueue using this sample code.

Abhishek Lal
  • 3,233
  • 1
  • 17
  • 16