Message Components

Solace PubSub+ uses the Solace Message Format (SMF) protocol for client and event broker communications. SMF uses a proprietary binary message format that provides an efficient method of encapsulating messages for transmission over the platform.

Messages exchanged between clients using the Solace messaging APIs (including the Solace JMS API) have formats that are compatible across all Solace messaging APIs. That is, messages produced by a client using one Solace API can be understood by any other consuming client using another Solace API.

The following figure displays the basic message components of a JMS message and how they are mapped to components in a Solace SMF message. These are logical diagrams, not wireline depictions.

Mapping of JMS and SMF Message Parts

Header Fields

JMS header fields that can affect how a message is handled by an event broker are mapped to SMF headers, and all other JMS parameters are mapped to user properties.

Many of the message header field parameters are accessible to client applications through Solace messaging API set and get operations. For example, if a JMS application sets a correlation ID for a message (through message.setJMSCorrelationID(...)) and then publishes it to a queue destination, a client application using the Solace C API could receive that message and retrieve the correlation ID that was set for the message through a get function (in this case, solClient_msg_getCorrelationId(...)).

Message Body

The JMS message body is contained in the binary data payload of an SMF message. The message body is accessible to client applications through Solace API set and get operations. For example, a client application using the Solace .NET API could create a message (IMessage message = session.CreateMessage()) and then add the text body with the appropriate set method (SDTUtils.SetText(message, "this is the body text"). Then another client application using the JMS API could use the TextMessage.getText() method to retrieve the body of the text message.

Note:  If the Solace message property SOLACE_JMS_PROP_ISXML is used, it indicates that the text message contains XML content, and the body goes in the XML data payload.

The following table shows the standard JMS message header fields and the equivalent Solace SMF message header fields.

JMS Header Fields and Their Solace Equivalents

JMS

Solace

Contained in

JMSCorrelationID

CorrelationID

message property

JMSDeliveryMode

DeliveryMode

SMF headers

JMSDestination

Destination

SMF headers

JMSExpiration

Expiration

message property

JMSMessageID

ApplicationMessageID

message property

JMSRedelivered

Redelivered

SMF headers

JMSReplyTo

ReplyTo

message property

JMSTimestamp

SenderTimeStamp

message property

JMSType

ApplicationMessage
Type

message property

JMSPriority

Priority

SMF headers

For detailed information on the available get and set methods, refer to the APIs & Protocols for the appropriate messaging API.