Releases a message from a reliable queue
- Names the queue space to which queue belongs.
- Names the queue as defined in the JIF.
- A message output argument to receive the dequeued message. The argument's format must conform to the message data type as specified in the queue's JIF definition. For more information on message data types, refer to "Service Messages and Data Types" in JetNet/Oracle Tuxedo Guide.
- Specifies which message to dequeue; use one of the following arguments. If no argument is supplied, the first message in the queue is removed.
Remove the first message in the queue. This is the default behavior if no argument is supplied. If the queue is empty, the
WAIToption specifies to wait until a message becomes available for dequeuing; otherwise, an error message is posted.
Note, you should only use
FIRST_AVAILABLE WAITif there is more than one
TMQUEUEserver running, otherwise the one server will wait indefinitely for a message that cannot be enqueued. For further information on Oracle Tuxedo-provided servers, consult your Oracle Tuxedo documentation.
- Dequeue the message corresponding to
msgId. The message identifier is generated when the message is successfully enqueued.
- Dequeue the message corresponding to
corrID. The correlation identifier is set by the application when enqueuing the message.
- Use one or more of the following options to control the behavior of
- Specifies that the dequeue operation is unaffected by the blocking timeout; however, transaction timeouts remain in effect.
- Specifies to perform the dequeuing operation outside the current transaction. If message dequeuing fails, the current transaction is unaffected. If you specify this option, transaction-level exception and unload handlers are not executed when their corresponding events are generated.
- Use any the following keywords to set output arguments with information about the dequeued message:
- Returns the application authentication key associated with the client that enqueued the message.
- Returns the client ID of the agent that originated the request.
- Returns the message's correlation ID, set by enqueue. For more information about using correlation IDs, refer to the enqueue command.
- Returns the name of the queue where a failure message should be stored. The value is set if the dequeued message is associated with a failure queue.
- Returns the unique message ID if set and the dequeue was successful. The identifier is generated when the message is successfully enqueued.
- Returns the message's priority relative to other messages in the queue as an integer between 1 and 100, where 100 indicates the highest priority. A message with the highest number is dequeued before all others.
- Returns the return code specified by enqueue when the message was enqueued.
- Returns the name of queue where the reply message should be stored. The value is set if the dequeued message is associated with a reply queue.
The dequeue command removes a message from the specified queue. You can identify the message you want dequeued; otherwise, dequeue uses the first message. The order of messages in the queue is specified when they are enqueued. You can request a particular message for dequeuing by specifying its message identifier (
msgId) or correlation ID (
corrID). You can also indicate that the application wait for a message that is not immediately available.
dequeueis successful, it can return additional information about the message:
- The message identifier for the dequeued message.
You can determine the success or failure of
dequeueby checking the severity level that is set in the
For more information about Oracle Tuxedo System /Q, refer to "Reliable Queues" in JetNet/Oracle Tuxedo Guide and refer to your Oracle Tuxedo documentation.
dequeuecan generate the following exceptions:
Exception Severity Cause TP_INVALID_COMMAND_SYNTAX TP_COMMAND
Command syntax is invalid.
TP_INVALID_VARIABLE_REF TP_COMMAND or TP_WARNING
Unable to resolve reference to Panther variable.
No transaction exists.
Queue space not found in the JIF.
No message was available for dequeuing.
Message does not successfully dequeue within specified timeout.