Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WBRIDGE and version 24.0
Otp
maxHLevel1

A JMS message is composed of the following parts

NameDescriptionClass

Header

All JMS messages support the same set of header fields. Header fields contain values used by both clients and providers to identify and route messages.

JMSMessage

Properties

In addition to the standard header fields, JMS messages provide a built-in facility for adding optional header fields to a message.

JMSMessage

Body

JMS defines several types of message body, which cover the majority of messaging styles currently in use.

JMSBlobMessage and JMSStringMessage

The folder Data / Base Components / Add-Ons / JMS in the containment tree contains UML representations of all relevant JMS message types. E2E Builder links these base components during the creation of a model from the E2E Bridge template (see figure below).

Figure: JMS Base Components

Image Modified

JMS Message Header Fields

Figure: Attributes of the Base Component JMSMessage

Image Modified

As illustrated in figure above, the JMS adapter provides the following header fields:

Multiexcerpt include
MultiExcerptNameheader_fields
PageWithExcerptJMS

Most JMS headers are automatically assigned. Their value is set by the JMS provider when the message is delivered. Nevertheless, some headers can be overwritten by the developer. These fields are marked in bold in the table above.

JMS Message Properties

In addition to the header fields described before, the JMS Message interface contains a built-in facility for supporting property values. In effect, this facility provides a mechanism for adding optional header fields to a message.

As you can see in the figure below, the JMSMessage class contains a number of attributes, which can hold arrays of properties. Subfolder Property in Base Components/Add-Ons/JMS contains all available types of properties supported by the Bridge.

Properties and header fields allow a JMS client to have a JMS provider select messages on its behalf using application-specific criteria. This is communicated to the JMS Provider via message selectors (refer to the official Java Message Service Specification for selector statement syntax). The xUML examples include a message selector example.

JMS Properties in the Bridge are objects composed of a key-value-pair of attributes. The key attribute is of type String, contains the property name, and must obey the rules for a message selector identifier. The native Java types of the attribute value can be of type Boolean, Byte, Double, Float, Integer, Long, Short, or String. They are mapped to Bridge base types.

Figure: JMS Properties

Image Modified

For best performance, message properties should only be used if the header of a message needs to be customized. The primary reason for using message properties is to support customized message selection.

Figure: How to Set Properties in an Activity

Image Modified

JMS Message Body

The JMS adapter fully supports two types of a JMS message body: Byte and Text. Bridge type JMSBlobMessage corresponds to JMS message type ByteMessage; JMSStringMessage corresponds to JMS message type TextMessage (see figure below).

Figure: JMS Message Types Supported by the E2E Bridge

Image Modified

The JMS adapter does not fully support the other JMS message types. It cannot make available the body content of an incoming message of an unsupported message type.

If required, the JMS adapter converts the content of a message body of type String into an object of type Blob and vice versa. However, the Java Virtual Machine (JVM) uses the system encoding for the conversion which often leads to undesired effects. You can avoid those by using JMSBlobMessage for byte messages and JMSTextMessage for string messages in the xUML model.

Info
iconfalse

As an alternative to creating a JMSStringMessage or JMSBlobMessage object and setting its respective attributes, the JMS adapter accepts messages of type String or Blob.

Panel
titleOn this Page:
Table of Contents