4.4.2 Processing a tpdequeue Request

The syntax for a tpdequeue request is as follows:

tpdequeue (qspace, qname, qctl, data, len, flags)

A tpdequeue request requires all parameters shown previously. Following are brief descriptions of these parameters. For more information, refer to the Oracle TUXEDO Programmer's Guide.

QSPACE
The name of the service advertised by TMQUEUE_MQM. This value can be overwritten in the TUXEDO UBBCONFIG file using the - s option. For example: -s myname :MQMQUEUE

The default value is MQMQUEUE

QNAME
The name of the queue where you want the adapter to place or retrieve messages. Can contain up to 127 characters. Corresponds to a WebSphere MQ queue mapped from the TUXNAME parameter in the QUEUE section of the TMQUEUE_MQM configuration file.
QCTL
Provides additional information about the message. The supported options you can define for tpdequeue requests are as follows:
TPNOFLAGS
No options apply to this message
TPQGETBYMSGID
Dequeues the message with the specified message ID, if available. The specified message ID is truncated to 24 bytes and passed in the MsgId field of the MQMD structure when calling the WebSphere MQ MQGET API.
TPQGETBYCORRID
Dequeues the message with the specified correlation ID.
TPQPRIORITY
Message priority. TUXEDO values for this field can be from 1-100. The MQ values can be 0-9 and are mapped to TUXEDO values as follows: 0=TUXEDO 1-10, 1=TUXEDO 11-20, etc.
TPQCORRID
Correlation ID. Identifies the response to a request. TUXEDO supports up to 32 bytes. MQ supports up to 24 bytes, so this ID will always fit in 32 bytes supported by Tuxedo. The remaining 8 bytes are set to null characters.
TPQREPLYQ
Name of the queue where you want to place reply messages. Can contain up to 127 characters.
TPQMSGID
Return the message ID generated when the message is placed on the queue. MQ supports up to 24 bytes, so this ID will always fit in 32 bytes supported by Tuxedo. The remaining 8 bytes are set to null characters.
TPQPEEK
If this flag is set, the specified message is read but is not removed from the queue. This flag implies the TPNOTRAN flag has been set for the tpdequeue() operation. That is, non-destructive dequeuing is non-transactional. Note that it is not possible to read messages enqueued or dequeued within a transaction before the transaction completes.
TPQDELIVERYQOS
If this flag is set, the call totpdequeue() is successful, and the message was queued with a delivery quality of service, then the flag is stored in ctl->delivery_qos. If the MQGET call indicates a Persistence of MQPER_NOT_PERSISTENT, ctl->delivery_qos is set to TPQQOSNONPERSISTENT. Otherwise, it is set to TPQQOSPERSISTENT.

Note:

The TPQWAIT option is not supported for tpdequeue requests to TMQUEUE_MQM.
DATA
Data to be placed on the queue
LEN
Length of the data to be placed on the queue
FLAGS
Defines the flag settings for the message. The supported flags for tpde queue requests are as follows:
TPNOTRAN
Messages from callers that are in transaction mode are not dequeued within the same transaction as the caller.