This discussion is archived
1 Reply Latest reply: Feb 21, 2013 4:31 AM by damorgan RSS

Priority is not maintained in Dequeue of messages

user10302663 Newbie
Currently Being Moderated
Hi,

We noticed below issue during testing. Please clarify if it is an issue or existing behavior of 11G AQ.

DB Version: 11.2.0.3.0

We have two Queues Q1 and Q2 and both has two different call back procedures defined. Sort list for queue table is 'PRIORITY,ENQ_TIME'
Dequeue options used in both call back procedures is as below.
dequeue_opt.navigation := DBMS_AQ.FIRST_MESSAGE;
There is no Wait or delay specified in Enqueue of Dequeue of messages.

Queue Q1:

Message1 with Prioity 1
Enqueue time: 21-FEB-13 09.08.20.088594 AM
Dequeue time: 21-FEB-13 09.08.21.941879 AM

Message2 with Prioity 1
Enqueue time: 21-FEB-13 09.08.21.953047 AM
Dequeue time: 21-FEB-13 09.12.24.287818 AM

Queue Q2:

Message3 with Prioity 2
Enqueue time: 21-FEB-13 09.08.21.952681 AM
Dequeue time: 21-FEB-13 09.08.23.965968 AM

Message4 with Prioity 2
Enqueue time: 21-FEB-13 09.08.22.954581 AM
Dequeue time: 21-FEB-13 09.10.24.161970 AM

If you observe Message 2 is with high priority and earlier enq_time than message 4 and so we expected Dequeue of message 2 to happen first, but Dequeue of message 2 happened after message 4 dequeue and processing is completed.

Please suggest how we can achieve basic functionality of AQ, Priority dequeue of messages.

Regards
Sridhar

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points