What are MQe messages?

Introduction to the use of MQe messages

Messages are collections of data sent by one application and intended for another application. MQe messages contain application-defined content. When stored, they are held in a queue and such messages may be moved across an MQe network.

MQe messages are a special type of MQeFields items, as described in MQeFields. Therefore, you can use methods that are applicable to MQeFields with messages.

Therefore, messages are Fields objects with the addition of some special fields. Java™ provides a subclass of MQeFields, MQeMsgObject which provides methods to manage these fields. The C code base does not provide such a subclass. Instead, there are a number of mqeFieldsHelper_operation functions. The following fields form the Unique ID of an MQe message:
  • In Java, the timestamp, generated when the message is first created or, in C, when the message is first put to a queue
  • The name of the queue manager, to which the message is first put.
The Unique ID identifies a message within an MQe network provided all queue managers within the MQe network are named uniquely. However, MQe does not check or enforce the uniqueness of queue manager names.

In Java, the message is created when an instance of MQeMsgObject is created. In C, the Message is "created", that is UniqueID fields are added, when the message is put to a queue.

The mqeMsg_getMsgUIDFields()method or mqeFieldsHelpers_getMsgUidFields() function accesses the UniqueID of a message, for example:
Java code
C code
rc = mqeFieldsHelpers_getMsgUidFields(hMgsObj, 
                &exceptBlock,&hUIDFields);

MQe adds property related information to a message (and subsequently removes it) in order to implement messaging and queuing operations. When sending a message between queue managers, you can add resend information to indicate that data is being retransmitted.

Typical application-based messages have additional properties in accordance with their purpose. Some of these additional properties are generic and common to many applications, such as the name of the reply-to queue manager.


Terms of use | WebSphere software

(c) Copyright IBM Corporation 2004, 2005. All rights reserved.