Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Add ContentType to CloudQueueMessage #165

HowardvanRooijen opened this Issue · 3 comments

3 participants



This might be a more fundamental change than just to the Storage SDK - but I think it would be a very useful addition to the Queue Storage Service.

The majority of the time we use Queues we end up double serializing the message content: firstly we serialize the payload into a know "Resource" type which has a property of Content and a property of ContentType. This allows us to record the content type of the serialized message so we can easily deserialize it once the message is popped.


var resource = new Resource { ContentType = contentType, Content = JsonConvert.SerializeObject(message) };
string messageContent = JsonConvert.SerializeObject(resource);
var queueMessage = new CloudQueueMessage(messageContent);

It would be great if ContentType was a 1st degree supported property of CloudQueueMessage so that we couldn't need to implement this workaround to easily get contact back out of the queue message.



We will take this as a feature request. Due to the rest API this is not available now. That being said, many clients prefer to use QueueMessages as containers for some serialized message form, for example xml etc. As such you can essentially build this on top of the sdk ( very similar to what you have done above).


@piyushjo piyushjo closed this

Does this mean the request has been added to the feature backlog or has it been implemented? Thanks!


Added to the feature backlog. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.