Enterprise Integration Patterns
Messaging Patterns
Messaging Patterns
Format IndicatorMessaging Patterns » Message Construction

Several applications are communicating via Messages that follow an agreed upon data format, perhaps an enterprise-wide Canonical Data Model. However, that format may need to change over time.

How can a message’s data format be designed to allow for possible future changes?

Design a data format that includes a Format Indicator, so that the message specifies what format it is using.

The format indicator enables the sender to tell the receiver the format of the message. This way, a receiver expecting several possible formats knows which one a message is using and therefore how to interpret the message’s contents.

There are three main alternatives for implementing a format indicator:

  1. Version Number – A number or string that that uniquely identifies the format. Both the sender and receiver must agree on which format is designated by a particular indicator.
  2. Foreign Key – A unique ID—such as a filename, a database row key, a home primary key, or an Internet URL—that specifies a format document. The sender and receiver must agree on the mapping of keys to documents, and the format of the schema document.
  3. Format Document – A schema that describes the data format. The schema document does not have to be retrieved via a foreign key or inferred from a version number, it is embedded in the message. The sender and the receiver must agree on the format of the schema.

... Read the entire pattern in the book Enterprise Integration Patterns

Related patterns:

Canonical Data Model, Message

Creative Commons Attribution License

You can reuse the following elements under the Creative Commons Attribution license: pattern icon, pattern name, problem and solution statements (in bold), and the sketch. Other portions are protected by copyright.

Enterprise Integration Patterns book cover

Enterprise Integration Patterns
The classic, as relevant as ever. Over 90,000 copies sold.

Software Architect Elevator book cover

The Software Architect Elevator
Learn how architects can play a critical role in IT transformation by applying their technical, communication, and organizational skills.

Cloud Strategy book cover

Cloud Strategy
Fill the large gap between high-level goals and product details by understanding decision trade-offs.