How to simulate scenario where messages will get expired in AQ?
Since MAX_RETRIES = 0 for the Queue, any failed dequeue should result in status = 3(Expired). But, how can we simulate this so that messages gets expired ?
I tried with a ROLLBACK in the De-Queue block, but no joy.
Documents referrred:
1. Advanced Queueing MSG_STATE Values And Their Interpretation (Doc ID 102330.1)
2. Exception handling with expiration, max_retries and retry_delay (Doc ID 233102.1)
Codes below:
BEGIN
SYS.DBMS_AQADM.CREATE_QUEUE_TABLE
(
QUEUE_TABLE => 'TESTQ_TAB'
,QUEUE_PAYLOAD_TYPE => 'SYS.AQ$_JMS_TEXT_MESSAGE'
,COMPATIBLE => '10.0.0'
,SORT_LIST => 'ENQ_TIME'
,MULTIPLE_CONSUMERS => FALSE
,MESSAGE_GROUPING => 0
,SECURE => FALSE
);
End;
/
-- Create Q with MAX_RETRIES = 0