CallbackType (MQLONG)

Callback descriptor structure - CallbackType field

This is the type of the callback function. The value must be one of:

    MQCBT_MESSAGE_CONSUMER
    Defines this callback as a message consumer function.

    A message consumer callback function is called when a message, meeting the selection criteria specified, is available on an object handle and the connection is started.

    MQCBT_EVENT_HANDLER
    Defines this callback as the asynchronous event routine; it is not driven to consume messages for a handle.

    Hobj is not required on the MQCB call defining the event handler and is ignored if specified.

    The event handler is called for conditions that affect the whole message consumer environment. The consumer function is invoked without a message when an event, for example, a queue manager or connection stopping, or quiescing, occurs. It is not called for conditions that are specific to a single message consumer, for example, MQRC_GET_INHIBITED.

    Events are delivered to the application, regardless of whether the connection is started or stopped, except in the following environments:

    • CICS on z/OS environment
    • nonthreaded applications

    If the caller does not pass one of these values, the call fails with a Reason code of MQRC_CALLBACK_TYPE_ERROR

This is always an input field. The initial value of this field is MQCBT_MESSAGE_CONSUMER.

Parent topic: Fields for MQCBD