Bulb Flash:- Azure Message Queues-Passing objects

Azure queue takes either an array of bytes or a string as an input. While working on a web role- worker role interaction , i needed to pass the entire TableServiceEntity object(basically the Azure table datamodel) to the worker role.

I needed the partition key, the row key as well as some other attributes of the database entity in the worker role to do some processing…the best way out was XML Serialization!!

//serialize the tableserviceentity object in your webrole

Suppose your TableServiceEntity class is called XYZDataModel

//Deserialize it in your worker role

And now you have your XYZDataModel entity recreated in your worker role!!..Hope this helps you..We certainly will try to remember this piece of code!!

Thanks

Cennest

Advertisements

About Cennest
Cennest is the brainchild of a group of IT Professionals keen to try their hand in the world of IT Freelancing. After working in the corpora

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: