Metadata fields

Message metadata is a set of information that the system engine must maintain along with each message as it passes through the system. Metadata is not part of the user data contained in a message. This section lists the various metadata fields.

This tables lists the message metadata fields as they were originally implemented:

Metadata field Description
Class

This reflects whether the message is currently an engine message or a protocol message.

DestThread

This is the name of the current destination of the message.

After the message is initially routed, the DestThread and the OrigDestThread are initialized to be the same value.

DriverControl

This contains a Tcl keyed list that gives you some control over the protocol driver.

This field is a keyed list. It contains information that is specific to a single driver and other data that is generic and applies to almost all drivers.

ExpectReply

This is used during the protocol write stage to indicate if the engine should expect an application-level reply from this message.

Before the first module in an outbound TPS stack gets the outbound engine message, this value is set to the destination connection's Await replies configuration.

Forwarded

This is a boolean value used to indicate if the message has ever been forwarded. This is useful if an outbound TPS stack module gets forwarded messages from another connection and must manipulate them as they arrive in the module.

After turned on, this flag is never cleared by the engine.

Messages created by copying a message inherit this value.

Mid

When a message enters the engine, it is assigned a unique message ID that is stored in the Mid field.

This ID is used to identify and track the message as it flows through the engine, the recovery database, and possibly the error database.

OrigDestThread

This is the name of the original destination thread for the message after translation. This never changes throughout message life.

OrigSrcThread

This is the name of the thread or connection from which the message was originally read. This never changes throughout message life.

Priority

This is used to give special treatment to a message. Each message is placed in an engine queue according to its priority.

Higher priority messages are placed nearer to the head of each queue than messages of lower priority. Among messages of the same priority, a FIFO queue ordering is maintained.

RecordFormat

This is added by the translation system when creating an outbound message. This field contains the hub name, root, and name of format.

For fixed and variable layouts, it gives the file name of the layout.

For HL7 and other variant-based message formats, it gives the variant name.

SkipXlate

If this field is non-empty, then the translation thread does not route or translate the message. Instead, the translation thread sends a copy of the message to each destination thread that is listed in the source message’s DestThread field.

The translation thread does this by removing it from the pre-translation queue and placing it directly into the protocol queue one or more times. A copy is placed in the protocol queue for each destination. Each copy has the DestThread field updated to reflect the single destination to which the copy is sent.

After all the copies have been created, the source message is removed from the recovery database. The destination messages are moved to the appropriate post-translation queues.

SrcMid

This is used to identify and track the pre-translation message that created a post-translation message.

Every post-translation message that is created by the translation process has this field set to the Mid of the source message.

In addition, copied messages inherit this value.

SrcThread

This is the name of the current source of the message.

This field and the DestThread field can change as a message is forwarded, to reflect the true current source and destination threads for the message.

When a message enters the engine, its SrcThread and OrigSrcThread are initialized to be the same originating thread.

Type

This reflects whether the message is a data or reply message.

XlateThread

This is the name of the translation thread that handled the message translation.