Broker 10.15 | webMethods Broker Documentation | webMethods Broker Messaging Programmer's Guide | Broker to JMS Mappings | JMS Message Field Mappings | JMS Message: Body Fields
 
JMS Message: Body Fields
JMS message body fields (data) are mapped to Broker document body fields. The following table shows the body mappings between an outbound JMS message and a Broker Document:
JMS Message Type
Broker Document Fields
Notes
Message
No body fields
BytesMessage
bytes
Sequence of bytes
MapMessage
Each field in the map is a separate top-level field
Type of the field corresponds to the map field type
TextMessage
text
Unicode string field
StreamMessage
Each field in the stream is a separate top-level field. Since stream fields do not have a name, the document field name is a number prefixed by _sf_ (for example, _sf_1).
Type of the field corresponds to the map field type
ObjectMessage
object
Sequence of bytes
When non-JMS events are received, they are mapped to a JMS Message type according to the following algorithm:
*If there are no fields, the message type is Message.
*If there is a single string field, the message type is TextMessage.
*If there is a single byte sequence field named object, the message type is ObjectMessage.
*If there is a single byte sequence field, the message type is BytesMessage.
*If there are no structs or sequences, the message type is MapMessage.
*If there are no structs or sequences, then the entire event is encapsulated in a BytesMessage. The receiver can use the Broker Java API to decode the contents of the BytesMessage by creating an instance of BrokerEvent using the contents of BytesMessage. For more information, see BrokerEvent.fromBinData in the Javadoc.