WebSphere MQ message handling
Conceptually, the WebSphere® MQ message handling system takes a piece of information (the message) and sends it to its destination. MQ guarantees delivery despite any network disruptions that might occur.
In WebSphere MQ, a destination is called a message queue, and a queue resides in a queue manager. Applications can put messages on queues or get messages from them.
DB2® communicates with the WebSphere message handling system through a set of external user-defined functions, which are called DB2 MQ functions. These functions use the MQI APIs.
- message data
- Defines what is sent from one program to another.
- service
- Defines where the message is going to or coming from. The parameters for managing a queue are defined in the service, which is typically defined by a system administrator. The complexity of the parameters in the service is hidden from the application program.
- policy
- Defines how the message is handled. Policies control such items
as:
- The attributes of the message, for example, the priority.
- Options for send and receive operations, for example, whether an operation is part of a unit of work.
MQ functions use the services and policies that are defined in two DB2 tables, SYSIBM.MQSERVICE_TABLE and SYSIBM.MQPOLICY_TABLE. These tables are automatically created by DB2, but once created, they are user-managed and typically maintained by a system administrator. DB2 initially provides each table with a row for the default service and default policy. The default service is DB2.DEFAULT.SERVICE and the default policy is DB2.DEFAULT.POLICY.
The application program does not need to know the details of the services and policies that are defined in these tables. The application need only specify which service and policy to use for each message that it sends and receives. The application specifies this information when it invokes a DB2 MQ function.
