Creating two consumers one after the other causes problems dequeuing messages
-----------------------------------------------------------------------------

                 Key: AMQ-1961
                 URL: https://issues.apache.org/activemq/browse/AMQ-1961
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 5.1.0
            Reporter: Aaron Pieper
         Attachments: EnqueueDequeueBug.java

I create a vm queue with ten messages. I then create a consumer, dequeue the 
top message (message #1), and close that consumer. If I then create a second 
consumer, and try to dequeue the top message (message #2), there is a small 
chance that this will unexpectedly fail, and the request will time out. This is 
one problem.

After this happens, examining the queue with a queue browser shows message #2 
still on the queue. However, subsequent attempts to dequeue this message will 
always time out. Messages #3-10 will be in the same state; they will still be 
in the queue, but they cannot be dequeued. This is a worse problem, as it means 
that we can not reuse this queue.

The problem arises more frequently as there are more consumers. With two or 
three consumers, it comes up sporadically. With twenty or more consumers, it 
happens almost 100% of the time. I've attached a test case which demonstrates 
the bug consistenty.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to