Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 14 Working with TIBCO FTL : Message Translation

Message Translation
JMS Header Fields
EMS supports the predefined JMS header fields; see JMS Message Header Fields.
The JMSTimestamp JMS header field is a special case.
The JMS header JMSTimestamp corresponds to the time when the message was created. If this header field is not present when the tibemsd receives the message, it sets theJMSTimestamp to the current time.
TIBCO FTL messages do not have destinations or subjects, or a mandatory set of predefined header fields. Instead, message fields and their values are set for individual messages.
If the export_headers is defined as true in the common EMS transport properties, the EMS server converts the JMS header fields and their values to TIBCO FTL fields and values and adds them to the outgoing message. This allows TIBCO FTL to use content matchers on the fields.
If the export_headers property is false, then the JMS header fields and their values are not included in the exported TIBCO FTL message. This includes the destination name. That is, if export_headers = false for the transport, then the message exported to TIBCO FTL will not contain the destination name.
When converting the JMS header fields to TIBCO FTL message fields, header fields are given the prefix _emshdr:. For example, the JMSDeliveryMode header field is assigned the field name _emshdr:JMSDeliveryMode when inserted into the TIBCO FTL message.
Table 68 presents the mapping of JMS header fields to TIBCO FTL message field name and types (that is, the name and type of the corresponding field in the exported message).
 
_emsHdr:JMSReplyTo
JMS Property Fields
EMS supports the JMS property fields described in EMS Message Properties.
Import
When importing a TIBCO FTL message to an EMS message, tibemsd sets these JMS properties:
JMS_TIBCO_IMPORTED gets the value true, to indicate that the message did not originate from an EMS client.
JMS_TIBCO_MSG_EXT gets the value true, to indicate that the message might contain submessage fields or array fields.
Export
TIBCO FTL messages do not have destinations or subjects, or a mandatory set of predefined header fields. Instead, message fields and their values are set for individual messages.
If export_properties is defined as true in the common EMS transport properties, the EMS server converts the JMS properties and their values to TIBCO FTL fields and values and adds them to the outgoing message. This allows TIBCO FTL to use content matchers on the fields.
When converting the JMS properties to TIBCO FTL message fields, the property fields are given the prefix _emsprop:. For example the JMS_TIBCO_SENDER property would become the _emsprop:JMS_TIBCO_SENDER field.
The tibemsd server ignores any JMS property fields that are not set, or are set to null—it omits them from the exported message.
You can instruct tibemsd to exclude the properties fields from the exported message by setting the transport property export_properties = false.
Message Body
tibemsd can export messages with most JMS message body types to TIBCO FTL. However, Object messages and Stream messages cannot be exported. They are discarded with a warning.
tibemsd can import messages with any message format from TIBCO FTL.
For information about JMS body types, see JMS Message Bodies. For information about the structure of messages, see JMS Message Structure.
Import
When importing a TIBCO FTL message, tibemsd translates it to an EMS message body type based on the TIBCO FTL message format, as shown in Table 69.
_key (char*)
_data (bytes)
Export
When exporting an EMS message, tibemsd translates it to a TIBCO FTL message with the following structure:
When export_headers is enabled on the EMS transport, JMS header fields are converted to TIBCO FTL message fields. See JMS Header Fields. When the transport parameter export_headers is false, these fields are omitted.
When export_properties is enabled on the EMS transport, JMS property fields are converted to TIBCO FTL message fields. See JMS Property Fields. When the transport parameter export_properties is false, these fields are omitted.
 
Message Fields
When tibemsd converts messages, it converts fields individually, based on field type. Some field types are equivalent between EMS and TIBCO FTL, while converting others may result in some information loss of data type, or require additional formatting.
The mapping of equivalent fields is bidirectional. These field types are equivalent in EMS and TIBCO FTL, and no additional formatting is required during conversion:
Import
Not all TIBCO FTL field types are supported by EMS. When tibemsd imports a TIBCO FTL message, these fields are converted into EMS sub-messages as shown below.
Message array
_ftlMsgArray:fieldname
char* array
slong, representing seconds.
nlong, representing nanoseconds.
_ftlDateTime:fieldname
Sub-message containing tibDateTime equivalent sub-messages. Each submessage contains two fields:
slong, representing seconds.
nlong, representing nanoseconds.
Export
When exporting an EMS message, tibemsd translates it to a TIBCO FTL message. Not all field types that are supported by EMS map to TIBCO FTL. When tibemsd converts these fields, some information about data size is lost. The EMS fields are converted to TIBCO FTL fields as shown here:

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved