Oracle AQ message sent twice

I created AQ in oracle and wrote 2 JMS users in Java to listen on the queue. I sometimes noticed that if I create a message in the queue; the number of pending messages from the queue is greater than the number indicated in the queue. This means that some messages are consumed twice.

I created a queue with the property: - multiple_consumers => FALSE

And JMS users work in CLIENT_ACKNOWLEDGE mode

Please help me find out the possible reasons for this behavior and its solution. That way, I can replicate the problem and solve the above problem and make sure that the number of attached messages is equal to the number of messages deleted if several JMS users are listening on the same AQ.

+7
source share
1 answer

Without looking at the code, CLIENT_ACKNOWLEDGE usually says that you send confirmations manually. If you do not send ack, the message will not be deleted, and the broker will try to reinstall it at a later stage (for example, when rebooting the connection or the like). This may be the cause of your concern.

+3
source

All Articles