I am running my cloud service in debug mode in Visual Studio and I'm seeing a large delay from the button click event on my live site and hitting the breakpoint in my debug session of the cloud service. It takes about 20-30 seconds from button click until the queue message is present. Is this normal? Is this due to running in debug mode, or does this roughly represent what it would look like in production? This is my first cloud service project, so I'm still learning the knobs to turn. I am the only person hitting the cloud service as this is still in development.
EDIT to add code calls.
Here are the calls I am making from the website. The queue message is just a filename, so the message payload is very small.
CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();
//Retrieve a reference to a queue.
CloudQueue queue = queueClient.GetQueueReference("queue");
//Create the queue if it doesn't already exist.
queue.CreateIfNotExists();
//Create a message and add it to the queue.
CloudQueueMessage message = new CloudQueueMessage(filename);
queue.AddMessage(message, timeToLive: TimeSpan.FromMinutes(1), initialVisibilityDelay: null);
This call takes around 30 seconds to be picked up here in the WorkerRole:
// Retrieve a reference to a container.
CloudBlobContainer container = blobClient.GetContainerReference("mycontainer");
CloudBlobContainer hmtlcontainer = blobClient.GetContainerReference("conthtml");
// Create the container if it doesn't already exist.
container.CreateIfNotExists();
hmtlcontainer.CreateIfNotExists();
// Create the queue client
CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();
// Retrieve a reference to a queue
CloudQueue queue = queueClient.GetQueueReference("queue");
try
{
// Look for a new queue message
CloudQueueMessage peekedMessage = queue.GetMessage(visibilityTimeout: TimeSpan.FromSeconds(3));