Message Formats

Formats promote efficient message transfer by conserving transport bandwidth.

We have seen that a message is data, structured as a set of named fields, which contain values. Each message field contains data of a specific datatype. For simplicity and efficiency, TIBCO FTL messages support a limited set of data types. A publishing program can assemble a message with an arbitrary number of fields and any combination of the supported data types.

However, using arbitrary sets of fields has a cost: namely, each message must be fully self-describing. A self-describing message contains metadata: the names and data types of each field. Including the metadata enlarges each message, and results in slower processing of messages.

When the full flexibility of self-describing messages is not needed, TIBCO FTL software lets you achieve greater efficiency by abstracting the field metadata from a group of similar messages. We can define a message format, that is, a fixed set of field names and data types. Formats give cooperating programs the metadata to describe their messages, even before they exchange any messages. So a message that conforms to a format need not carry its own metadata, which reduces both message size and processing time.

Compare the self-describing message at the top of the following diagram against its more compact data at the bottom of the diagram.

Messages: Data & Metadata

For example, in an order fulfillment application, a product request message could contain a product name field with a string value, a warehouse bin field with an integer value, and a quantity field with an integer value. Programmers determine the format. Administrators define the format accordingly. Programs automatically receive this format definition at runtime.

When programs send messages with this format, they can include values for any subset of the fields in the format definition. Receiving programs already have the metadata they need to unpack data values from messages with this format.

TIBCO FTL software does not limit the number of formats that a program can use for sending or receiving messages. Nonetheless, in practice, many applications exchange only a few types of messages.