fsprojects / FSharp.CloudAgent

Allows running F# Agents in a distributed manner using Azure Service Bus.
http://fsprojects.github.io/FSharp.CloudAgent/
The Unlicense
39 stars 14 forks source link

Added support for receiving non-string messages #11

Closed hussam closed 8 years ago

hussam commented 8 years ago

CloudAgent currently assumes uses the BrokeredMessage.GetBody<_>() function to get messages from Azure Service Bus queues. This function uses a DataContractSerializer to construct the message body. https://msdn.microsoft.com/en-us/library/azure/hh144211.aspx . However in some cases (e.g. receiving service bus messages that are sent from a python client), the DataContractSerializer doesn't work and a different XmlObjectSerializer is needed. I exposed that option and temporarily called it a "WireSerializer" to distinguish it from ISerializer objects that convert a string to whatever object the user wants. A better name should probably be used.

isaacabraham commented 8 years ago

Nice! I am actually hoping to add some more configuration options etc. at some point anyway regarding serialization.