JMS protocol
Decision Server Insights can receive and send events in the form of JMS text messages or JMS bytes messages. The messaging provider can be either WebSphere® MQ or WebSphere Application Server.
JMS inbound message format and encoding
| Message format (from binding) | Message type | Message content | Character encoding |
|---|---|---|---|
application/xml or text/xml |
TextMessage |
Message text parsed as XML. | As presented by the messaging provider. The encoding that is specified in the XML directive is ignored. |
BytesMessage |
Message bytes parsed as XML. | If present, the JMS_IBM_Character_Set message property is authoritative. Otherwise, the encoding that is specified in the XML directive is used. | |
application/json |
TextMessage |
Message text parsed as JSON. | As presented by the messaging provider. |
BytesMessage |
Message bytes parsed as JSON. | If present, the JMS_IBM_Character_Set message property is authoritative. Otherwise, UTF-8 is used. |
An inbound JMS endpoint expects a message that conforms
to the message format that is specified by the associated inbound
binding definition. If the inbound binding specifies application/xml or text/xml,
the message must either conform to an XML schema that represents an
event type (TYPED_XML), or must be classified and transformed by the
inbound binding definition. If the inbound binding specifies application/json,
the message must contain a JSON representation of an event. An inbound
JMS endpoint rejects messages that contain invalid XML or JSON content.
However, an inbound JMS endpoint accepts and discards messages that
contain valid XML or JSON documents but nevertheless cannot be identified
as instances of event types defined by the business model of the solution.
JMS_IBM_Character_Set message property, see
JMS client message conversion and encoding.JMS outbound message format and encoding
| Message format (from binding) | Message type | Message content | Character encoding |
|---|---|---|---|
application/xml or text/xml |
TextMessage |
Message text contains XML 1.1 content. The encoding UTF-8 is specified in XML directive. | The message includes a JMS_IBM_Character_Set message property with the value UTF-8. |
BytesMessage |
Message bytes contain XML 1.1 content. The encoding UTF-8 is specified in XML directive. | The message includes a JMS_IBM_Character_Set message property with the value UTF-8. | |
application/json |
TextMessage |
Message text contains JSON content. | The message includes a JMS_IBM_Character_Set property with the value UTF-8. |
BytesMessage |
Message bytes contain JSON content using UTF-8 encoding. | The message includes a JMS_IBM_Character_Set message property with the value UTF-8. |
By default, the outbound JMS message is a TextMessage with
the JMS delivery mode PERSISTENT. These settings
can be customized for individual outbound JMS endpoints by using advanced
properties.
If the outbound binding specifies application/xml or text/xml,
the message conforms to the XML schema that represents the event (TYPED_XML), or is transformed
according to the outbound binding definition. If the outbound binding specifies
application/json, the message contains the JSON representation of the event. The
outbound binding can also specify JMS type, JMS correlation ID, and message property values.