This discussion is archived
5 Replies Latest reply: Jul 19, 2012 12:03 AM by 949968 RSS

Is there any way to find out that Oracle queue is empty?

949968 Newbie
Currently Being Moderated
Hi everyone,

I am trying to read message from a oracle queue, de-queuing it.
My code is working fine till Queue has all messages. Once all messages are processed, it is throwing error.

For example,
If i have 3 messages in Queue, my code is dequeuing those three messages fine, and then it is going to dequeue Queue again and as a result of it, code is throwing error.

So, i must get to know, if there is a mechanism to check Queue is empty and then i will stop my code from trying to de-queue the Queue.

Please help me with this.


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