Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is it possible to acknowledge individual messages on a queue without affecting previously received, but as yet unacknowledged, messages?

0
Posted

Is it possible to acknowledge individual messages on a queue without affecting previously received, but as yet unacknowledged, messages?

0

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

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123