-
Working with Azure Queues: Learning things the hard way.
There are times when I do something so stupid that I feel the need to share with everyone, just to reinforce the point that I don’t need to do it again. :)
Today would be one of those days. Here is what I did:
I was working on my new web site which uses a Windows Azure Queue as a Message Processing System. Basically I drop a specifically formatted string into a queue and a Azure Worker Role retrieves the message and processes it based on the contents.
I was adding a new message type today it it wasn’t being processed. Not because the message wasn’t being decoded properly, because the message was never being seen.
What the heck, over? It’s worked for the past two weeks, what would make the messages just disappear from the queue or maybe not be added?
Well, after wasting about 30 minutes tracing the message through the system, I realized what I was doing wrong ( and where the stupid part comes in ).
Since my site is still under development I haven’t broken the internal mechanisms into Development and Production versions. I do, however, have Development and Staging version of my application running on Azure.
And that was the problem.
I was running my site locally but pointing to the Cloud instances of my storage. Every time I placed a message in my queue, either the Production instance or the Staging instance would see the new message and process it. The last part of processing involves deleting the message from the queue.
Since two other instances of my site were running, by the time my local instance woke up to look at the queue contents, one of the other instances had already processed it. This made me think things were not working.
Anyway, note to self: Make sure the instance of the application you are working on is in sole control of any assets required to properly build and test it
Azure, Development 242 viewsLeave a reply



