Why Messaging #2 – What is a message

So what is a message?

A message is an atomic unit of work. It should contain all of the data needed for the receiver to do its job. Ok, well that’s great but what is it? Its really pretty simple:

XML

<order>
	<item no="22" />
	<name>billy</name>
<order>

or

JSON

{ order: { no:22; name:"billy"; } }

or

Binary

10111000110100111011100010101001101101101

It is state that is defined much in the same way a feed file would be prepared, and it has the intent of being sent to another party. Not including key values (database keys) (thereby assuming the source system can just look up the values associated) is also an important point. With messaging, unlike text files, it tends to be one item per message because one of the goals again of the message over file transfer is speed of delivery. Rather than wait for a bunch to accumulate you send them when the occur. Of course, as Udi would tell me, it all depends on the actual system need. :)

And that is how I think of a message.

-d

About Dru Sellers

Sr. Software Engineer at Dovetail Software.
This entry was posted in Uncategorized. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • joey

    Why not including key values in the message for the receiver to do lookups and further processing?

  • http://codebetter.com/members/drusellers/default.aspx drusellers

    @joey, not sure I quite follow. But the point of the post was to show that there is nothing really that magical about the message.

  • http://shane.jscconsulting.ca Shane Courtrille

    You stated that not including key values is an important point. What’s important about it I think is the question?