[
https://issues.apache.org/activemq/browse/AMQ-1961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
James Strachan resolved AMQ-1961.
---------------------------------
Resolution: Fixed
I don't think this is a bug, just a misunderstanding or misconfiguration of the
prefetch size...
http://activemq.apache.org/what-is-the-prefetch-limit-for.html
setting a prefetch size of 1 or zero should fix your issue - or waiting long
enough for messages to be redispatched to the closed consumer.
> 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.