Entry
What is the main difference between Messages and Variables?
Apr 6th, 2005 22:24
Balaji Ramachandran, http://www.netologi.se/default.aspx?Contents=BizTalkFAQ
This basic answer to this question is quite simple, but it is still a
complex issue that took me some time to understand.
Messages can be sent and received, variables cannot.
Variables are saved in the orchestration state using .NET
serialization. Message parts are serialized into XML and are saved in
this form (compressed though) in the message box.
Message parts are not actually copied when copied/sent/received within
BTS, as long as they are not modified. They are passed by DB reference.
Property/distinguished field can only be applied to messages, and is
optimized so that in many cases the data doesn't have to be loaded into
memory, or is processed in chunks.
Message parts are automatically converted between several formats
(XmlDocument, .NET object, Stream, XmlReader, etc.)
Messages are tracked, variables are not.