3
votes

I'm new to Azure so this may be something obvious that I'm missing. I created a new Azure Cloud Service project and added a web role and worker role. In the web role I upload a file to blob storage. That part works fine. As part of that that process I added a message to the azure message queue. In my worker role I'm checking for a message in the queue. The issue is the worker role does not appear to be working. In debug mode I put in a break point and it never gets hit. Is there a step that I am missing that starts the worker role or something?

3
Did you run the Azure cloud project?SLaks
I have the Azure cloud project with a web role and worker role. I'm not sure what your question is?daustin
Which VS project did you execute?SLaks
Probably the web role project. So maybe I need to execute the Azure cloud project. Is that what you are saying?daustin
I will try that this evening when I get home. I had a feeling it might be something simple because I saw so many simple examples of using web role and worker role.daustin

3 Answers

4
votes

You need to run the Azure project itself, not the individual roles.
This will start all of the roles in the Azure development fabric.

0
votes

Can you share the code for your worker role's OnStart() method. One thing I can think of is that your role's OnStart() method is terminating which should not be happening. There should be an infinite loop inside your worker role's OnStart() method inside which you will need to repeatedly call the function which checks the queue status.

0
votes

If you run the Azure project, it will automatically initiates the roles. If you want to debug, then enable intelli trace and debug your application in development fabric.