IBM MQ Message Body Schema
If the message content type for a message is set to Schema, then the message is parsed or rendered (depending on the operation) based on the schema derived from this resource. Therefore, to interact with an application all that has to be known is the schema to which its messages conform.
Message Body Configuration
To create a schema, instantiate a Message Body Schema resource and add fields in the sequence that they are displayed in the message.
Note:
- The string type fields require the length to be provided. The length is ignored for other types. Data is space padded or truncated as necessary to conform to the length provided.
- The fields are inserted or removed from the message in the order in which they are added to the table in this resource.
- Field names must be unique.
- If there is no syncpoint in place for the activity and an error occurs while extracting message body fields which causes the activity to fail, then the message is effectively lost. If there is any chance of this happening in your application, force a syncpoint. See the Explicit Commit checkbox from the Multi-Message tab .
The Message Body Configuration panel contains the following columns:
Column Name | Description |
---|---|
FieldName | Assign a unique name to this field. The name is for reference and XML consistency only, and is not stored in the message. |
FieldType | Select a type from the
FieldType list.
For detailed field types, see the following table. |
String Length | Specify the length for a string. |
The following table lists the field types and the methods used to access the field types:
Field Type | Put API | Get API |
---|---|---|
String | writeString | readStringOfCharLength (name encodes length) |
Boolean | writeBoolean | readBoolean |
Byte | writeByte | readByte |
Bytes | write | readFully |
Short | writeShort | readShort |
Int | writeInt | readInt |
Long | writeLong | readLong |
Float | writeFloat | readFloat |
Double | writeDouble | readDouble |
Decimal2 | writeDecimal2 | readDecimal2 |
Decimal4 | writeDecimal4 | readDecimal4 |
Decimal8 | writeDecimal8 | readDecimal8 |
Unsignedbyte | write | readUnsignedByte |
Unsignedshort | writeShort | readUnsignedShort |
Utf | writeUTF | readUTF |
Char | writeChar | readChar |
Line | writeString | readLine |
Copyright © Cloud Software Group, Inc. All rights reserved.