Oracle AQ same message is delivered twice

I created a AQ in oracle and wrote 2 JMS consumers in Java to listen to the queue. I have observed sometimes that if I produce some message in to queue; the count of dequeued messages from queue is greater than what enqueued. It means that some messages are consumed twice.

I have created queue with property:- multiple_consumers => FALSE

And JMS consumers are working in CLIENT_ACKNOWLEDGE mode

Please help me learn the possible reasons for such behavior and it's solution. So, that I can replicate the problem and solve above issue and ensure that the number of message enqueued is equal to number of message dequeued in case of multiple JMS consumers listening to same AQ .


Without having seen your code, CLIENT_ACKNOWLEDGE typically says you are sending acknowledgements manually. If you do not send an ack, the message won't get deleted and the broker will try to redeliver it at a later stage (like when you restart the connection or similar). This might be the cause of your concern.

链接地址: http://www.djcxy.com/p/13340.html

上一篇: 在删除同一个QuerySet中的对象时迭代Django QuerySet

下一篇: Oracle AQ相同的消息传递两次