mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-5146 - durable sub redelivery test regression https://issues.apache.org/jira/browse/AMQ-5156 - pre delivery check for max redelivery should only apply to transacted sessions
This commit is contained in:
parent
fdc2551eb8
commit
f70dc74312
|
@ -524,12 +524,13 @@ public class ActiveMQMessageConsumer implements MessageAvailableConsumer, StatsC
|
|||
|
||||
private boolean redeliveryExceeded(MessageDispatch md) {
|
||||
try {
|
||||
return redeliveryPolicy != null
|
||||
return session.getTransacted()
|
||||
&& redeliveryPolicy != null
|
||||
&& redeliveryPolicy.getMaximumRedeliveries() != RedeliveryPolicy.NO_MAXIMUM_REDELIVERIES
|
||||
&& md.getRedeliveryCounter() > redeliveryPolicy.getMaximumRedeliveries()
|
||||
// redeliveryCounter > x expected after resend via brokerRedeliveryPlugin
|
||||
&& md.getMessage().getProperty("redeliveryDelay") == null;
|
||||
} catch (IOException ignored) {
|
||||
} catch (Exception ignored) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue