activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bobsponge <>
Subject Problem with enumeration in queue browsing
Date Mon, 28 Apr 2008 14:46:43 GMT

I'm using a browser for getting messages stored in a queue without removing
them. The queue is filled with more than 12000 elements and I want to access
to single messages one by one. The main part of the method I use for getting
messages looks like this one:

if((queueContent= browser.getEnumeration())!=null){           
            while(queueContent.hasMoreElements() && !msgFound) {
               if((qDequeuedMsg = (Message)

                     objectMsg = ( ObjectMessage ) qDequeuedMsg;
                     qMsg= (QueueMessage) objectMsg.getObject();


>From a different part of my application I call this method for getting
messages from the queue as long as they're needed. 
The first 156 times it works ok, but the next time this method is called and
the enumeration is built no more than 67 messages are listed. Every time I
run my application it always happens the same problem.
I'm ussing ActiveMQ 4.1.1. 
Is there any problem in listing messages this way?

Thank you

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message