activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jigar Naik <>
Subject unable to consume all the messages from activeMQ
Date Thu, 24 Jul 2008 08:35:41 GMT

I have one java class which produces 100 messages on active MQ,

And in another java class i have a method which produces one message from
activeMQ and return it as a String.

And i have created thread which will call the method which consumes one
message from activeMQ,

but when i run the thread it thread doesn't consume all the messages from

I dont know you it is happening, any body please help me with this,

I have attached 2 .java file

1) which contains the method which consume one massage form
2) which run the thread for consuming messages. (but
actially it is not consuming all the messages)

bellow is my activeMQ final console, After Producing 100 message, my Thread
consumed only 70 messages. 

ActiveMQ Console :

MyQueue 	30 	1 	100 	70 	 Browse   	 Send To  Purge  Delete 

Please help me out this with.

What i want to achieve is, 

My Consumer should be always run, how many messages to consume and at what
interval should be configurable.

If there is any other way to acheve this please let me know.

Thanks and Regards,
Jigar Naik

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

View raw message