Azure queue with strongly typed messages
I've been reading a lot about cloud patterns recently (e.g. from microsoft ) and one thing I've really wanted to do is move background processing to a worker role. To get started I decided to move our recurring jobs that we were running in the web role to a worker role because there are some limitations that are hard to avoid when running background work in ASP.NET. The idea was simple - set up an Azure scheduler to put items on an Azure Storage Queue and have a worker role polling the queue and reacting to the messages. For simplicity, I created a simple wrapper for the queue messages public class CustomMessage { public string TypeName { get ; set ; } public string Payload { get ; set ; } } Then when I queue a message I serialize an object to JSON with JSON.Net and create an instance of the CustomMessage class to put on the Queue. I actually have a service which maps from the CustomMessage to a CloudQueueMessage and vice vers...