activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <rajdav...@gmail.com>
Subject Re: How to get first 100 messages in the queue into an array
Date Wed, 17 Jun 2009 21:38:04 GMT
Well - the OOM must be a bug - will try it out on the latest
On 17 Jun 2009, at 21:57, Vuppala wrote:

>
> I am using ActiveMQ-5.2.0.
>
>
> I have a scenario like, Queue can have a lot more than 100,000  
> messages.
> So, I am afraid I get OutOfMemory error if I tried to move them to a
> different queue in a single shot.
>
> I see method 'browse' on 'QueueView' class which returns all the  
> messages in
> the queue.
>
> So, if I can read specified number of messages ( like first 100)  
> into an
> array and move them to a different queue and loop the same till  
> queue gets
> emptied.
>
> Please help me how can I achieve this at the earliest possible as I am
> running short of time.
>
> I appreciate your help.
> -- 
> View this message in context: http://www.nabble.com/How-to-get-first-100-messages-in-the-queue-into-an-array-tp24081944p24081944.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


Mime
View raw message