Is it possible to acknowledge individual messages on a queue without affecting previously received, but as yet unacknowledged, messages?
Location: http://www.jguru.com/faq/view.jsp?EID=282717 Created: Dec 20, 2000 Modified: 2000-12-29 06:58:43.228 Author: David Ben-Yaacov (http://www.jguru.com/guru/viewbio.jsp?EID=18017) Question originally posed by Gordon Tyler (http://www.jguru.com/guru/viewbio.jsp?EID=215316 If you acknowledge a message, all previously received messages will also be acknowledged. From the javax.jms.Message Javadoc, the acknowledge method will “Acknowledge this and all previous messages received.” So the answer to your question is no, if what you meant by “affecting” is not-yet acknowledged. I suggest an alternative. You should look at javax.jms.QueueBrowser to review queued messages. QueueBrowser has getEnumeration, which “Gets an enumeration for browsing the current queue messages in the order they would be received”.
Related Questions
- Is it possible to acknowledge individual messages on a queue without affecting previously received, but as yet unacknowledged, messages?
- What happens to messages when a network outage removes the route between an exchange and a bound queue?
- Can we automatically send back a response for all messages received to a mailbox?