WebSphere MQ message queues

Message queueing provides an alternative to calling a remote program. With message queueing, programs communicate by writing to and reading messages from queues.

The Message Queue Interface (MQI) is an IBM® specification of an application programming interface (API) for accessing the WebSphere® MQ (formerly MQSeries®) message and queuing services that support data transfer between programs running on a wide variety of IBM and non-IBM platforms. The services allow programs to communicate without knowledge of the lower levels of the communication network and without knowledge of the location of the other programs.

A message queue can be on the same system as a program (local) or on another system (remote). Queue managers manage access to queues and transmission of data between queues.

An MQI message is a string of data sent from one program to another. An MQI message consists of program information and routing information used by the message queue manager (control information). The structure and content of the program information is determined by the communicating programs, not by the queue manager.

Programs that use message queueing techniques have the following features:
EGL supports calls to WebSphere MQ message queues in two ways:

New code should use EGL keywords to communicate with message queues.

EGL uses resource associations to determine the queue to which the record is assigned. For more information, see Defining resource associations for message queues.

Subsequent sections provide the details of creating WebSphere MQ programs in EGL.

Defining messages in EGL

EGL uses a record with the MQRecord stereotype to create the internal representation of a message.

MQRecords follow the same general rules as other EGL records. They consists of message data and a number of properties. One set of properties tells EGL how to create the API commands it generates to communicate with WebSphere MQ. Another set provides the physical name of the message queue to use (fileName), the logical queue name (queueName), the size of the variable length record (lengthItem), and other basic information.

For more information about these properties, see MQRecord properties.