Chapter 16 Working With TIBCO SmartSockets : Message Translation

Message Translation
JMS Header Fields
EMS supports the ten predefined JMS header fields; see JMS Message Header Fields.
Two Special Cases
These two header fields are special cases:
JMS header JMSDestination corresponds to SmartSockets dest.
JMS header JMSReplyTo corresponds to SmartSockets reply_to.
Import
When importing a SmartSockets message to an EMS message, tibemsd does not set any JMS header fields, except for the special cases noted above.
Export
When exporting an EMS message to a SmartSockets message, tibemsd groups all the JMS header fields (except for the special cases noted above) into a single submessage within the SmartSockets message. The field JMSHeaders contains that submessage. Fields of the submessage map the names of JMS header fields to their values.
tibemsd ignores any JMS header fields that are null or absent—it omits them from the exported message.
You can instruct tibemsd to suppress the entire header submessage in all exported messages by setting the transport property export_headers = false.
JMS Property Fields
Import
When importing a SmartSockets message to an EMS message, tibemsd sets these JMS properties:
JMS_TIBCO_IMPORTED gets the value true, indicating that the message did not originate from an EMS client.
JMS_TIBCO_MSG_EXT gets the value true, indicating that the message might contain submessage fields or array fields.
JMS_TIBCO_SS_SENDER gets the value of the SmartSockets sender header field (in SmartSockets syntax).
In addition, tibemsd maps SmartSockets message properties to EMS properties; for details see SmartSockets Message Properties.
Export
When exporting an EMS message to a SmartSockets message, tibemsd groups all the JMS property fields into a single submessage within the SmartSockets message. The field JMSProperties contains that submessage. Fields of the submessage map the names of JMS property fields to their values.
tibemsd 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 suppress the entire properties submessage in the exported message by setting the transport property export_properties = false.
SmartSockets Message Properties
In release 4.1.0 (and later), tibemsd maps SmartSockets message headers to EMS message properties on import. Table 59 summarizes the mapping. The first column indicates the EMS property, and the second column indicates the SmartSockets method that gets the corresponding header.
Import
The transport parameter import_ss_headers governs the import behavior. The third column of Table 59 lists the values of that parameter for which tibemsd imports the message property in that row. See import_ss_headers on page 393.
Export
EMS client programs may modify the values of these properties within imported messages for re-export to SmartSockets. (However, exporting a native EMS message does not carry these properties to SmartSockets.)
Export of these properties depends on the value of the transport parameter export_properties on page 395.
When exporting an EMS message to SmartSockets, tibemsd maps these properties in reverse. In most cases, the mapping is symmetric—export maps them back to the same SmartSockets header. However, three exceptions (JMS_TIBCO_SS_SENDER, JMS_TIBCO_SS_MESSAGE_ID and JMS_TIBCO_SS_SEQ_NUM) are asymmetric—export maps them to subfields of the field JMSProperties within the SmartSockets message. The fourth column of Table 59 indicates this asymmetry.
 
Export Asymmetr.
none
type_num
all
Message Body
tibemsd can export messages with any JMS message body type to TIBCO SmartSockets. Conversely, tibemsd can import messages with any message type from TIBCO SmartSockets.
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 SmartSockets message, tibemsd translates it to one of two EMS message body types:
If the SmartSockets message contains only unnamed fields, then it translates into a JMSStreamMessage. The stream contains the values of the unnamed fields in the same order as they appear in the SmartSockets message.
If the SmartSockets message contains one or more named fields, then it translates into a JMSMapMessage. The map message contains the named fields; the order of the fields is indeterminate.
Export
When exporting an EMS message, tibemsd translates it to one of six SmartSockets message types (see Table 60) with the following structure:
The named field JMSHeaders is the first field (omitted when the transport parameter export_headers is false). It contains a submessage; see JMS Header Fields.
The named field JMSProperties is the next field (omitted when the transport parameter export_properties is false). It contains a submessage; see JMS Property Fields.
The data fields follow the JMS headers and properties (when present). For details about field names and types, see the third column of Table 60.
 
SmartSockets Message Type
All other JMS message types
Data Types
Table 61 presents the mapping between EMS datatypes and SmartSockets datatypes. The mapping is bidirectional, except for a few SmartSockets types that have no corresponding EMS type (for these types the mapping is marked as unidirectional in the middle column of Table 61).
 
<
<
<
<
<
Destination Names
tibemsd automatically translates destination names when importing or exporting a message; see Slash & Dot Separators.
When importing, it translates names in the SmartSockets subject and reply_to fields. When exporting, it translates names in the EMS JMSDestination and JMSReplyTo fields.