Predefined and self-defining messages

Each message flowing through your system has a specific structure, which is meaningful to the applications that send or receive that message.

WebSphere Message Broker refers to the structure as the message template. Message template information comprises the message domain, message set, message type, and physical format of the message. Together these values identify the structure of the data that the message contains. Every message flow that processes a message conforming to this template must understand the template to enable the message bit stream to be interpreted.

You can use:

Predefined messages

When you create a message using the workbench, you define the fields (Elements) in the message, along with any special field types that you might need, and any specific values (Value Constraints) to which the fields might be restricted.

Every message that you model in the workbench must be a member of a message set. You can group related messages together in a message set: for example, request and response messages for a bank account query can be defined in a single message set.

When you deploy a message set to a broker, the definition of that message set is sent by the Configuration Manager to the broker in the form of a message dictionary. The broker can manage multiple message dictionaries simultaneously.

For information about the benefits of predefining messages, see Why model messages?.

The Video Rental sample and the Comma Separated Value (CSV) sample demonstrate how to model messages in XML, CWF, and TDS formats. The EDIFACT sample, FIX sample, SWIFT sample, and X12 sample provide message sets for industry-standard message formats, which might be useful if you use any of those formats.

Self-defining messages

You can create and route messages that are self-defining. These use the XML standard to provide structure to the message, so that it can be interpreted and modified.

Self-defining messages can also be modeled using the workbench. This permits the use of the logical message template by nodes within a message flow. However, you do not have to deploy these message sets to the brokers that support those message flows.

The Large Messaging sample, the Airline Reservations sample, and several other samples in the Samples Gallery use self-defining XML messages for the sake of simplicity; they don't require a message set. The Coordinated Request Reply sample demonstrates how you can transform a message from self-defining XML to a predefined Custom Wire Format (CWF) format, and the Data Warehouse sample demonstrates how you can extract information from an XML message and transform it into BLOB format to store it in a database.

Support for JMS messages

WebSphere Message Broker supports jms_map and jms_stream messages: it does not support any other category of JMS messages. For further information about using JMS messages with WebSphere Message Broker, see the WebSphere MQ Using Java book.

Related reference
Built-in nodes