This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes activemq queue problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "activemq queue problem" Watch "activemq queue problem" New topic
Author

activemq queue problem

Ishant Agarwal
Greenhorn

Joined: Sep 09, 2011
Posts: 22
Hello Everyone,

I am using activemq where my publisher class used queue for sending persistent messages and consumer class used to dequeued mesages from the selected queue, below given code which I am suing for the same:-





now when i first run my publisher class it sends message and then when i run my consumer class it tooks the message from queue but when i stop my consumer class and then restart it, it again took the same message which it consumes before.kindly correct me where i am doing wrong code and enable me to consumer only those messages which did not consumer ever before.

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: activemq queue problem
 
Similar Threads
JMS: Problem with Consumer Program
JMS Consumer ends even after implementing MessageListener interface.
JMS: Problem with Consumer Program
JMS Consumer not receiving any messages.
annotations for JNDI lookup