jeanouii commented on code in PR #1616:
URL: https://github.com/apache/activemq/pull/1616#discussion_r2707747606
##########
activemq-client/src/main/java/org/apache/activemq/ActiveMQMessageConsumer.java:
##########
@@ -933,6 +943,16 @@ private void beforeMessageIsConsumed(MessageDispatch md)
throws JMSException {
if (!isAutoAcknowledgeBatch()) {
synchronized(deliveredMessages) {
deliveredMessages.addFirst(md);
+ if (session.isTransacted()) {
Review Comment:
The bug (prefetched messages not redelivered after transaction failure) was
related to transactions only. So I did not wanted to impact other scenarios.
But there is outside of this a rational.
The previouslyDeliveredMessages map (and prefetchedOnly) is only used to
track rollback/redelivery behavior, which only exists for transacted sessions.
In a non‑transacted session there is no rollback; delivery state is driven by
the ack mode (AUTO/CLIENT/DUPS_OK).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact