So using your orignal steps to recreate the issue, can you fill in where you do the queue browsing?
* I have a test which puts 10 messages on a queue. This queue is being read > via a transacted consumer. > * I then shutdown the broker without committing or rolling back the > session. > I am doing this with an embedded broker, so the process does /not/ get shut > down. > * I then restart the broker and read the queue, again with a transacted > consumer. > * Sometimes (about 5% maybe) after the restart only 9 messages are on the > queue. > * There are no ActiveMQ or KahaDB ERRORs when this occurs > * It seems that it is always the first message that was put on the queue > which is missing On Tue, Oct 30, 2012 at 7:19 AM, mserrano <mar...@attivio.com> wrote: > Thanks. I will try to. In part of my test I am using a QueueBrowser to > inspect what is on the queue. I do this to check the state at various > points to make sure it meets expectations. When I removed these checks > (which weren't completely necessary), the problem when away. So my concern > here is that since (I believe) the QueueBrowser is used for JMX inspection, > does this leave a possible, albeit small, chance that using JMX will > "corrupt" the state of a queue? > > I also confirmed that this is happening before the shutdown (i.e., not an > issue with reading the KahaDB store after restart) by capturing the KahaDB > store from a failed test and replaying it. It always has the bad set of > messages. > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Message-sometimes-lost-when-transaction-open-and-broker-restarted-tp4658295p4658458.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta