[
https://issues.apache.org/jira/browse/QPIDJMS-388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16579538#comment-16579538
]
Robbie Gemmell commented on QPIDJMS-388:
----------------------------------------
Its not that interesting really, its probably becuase Spring uses a polling
synchronous receive call with timeout under the covers (unless configured
otherwise), and so is entirely different than a JMS MessageListener. For
non-Spring uses, you could follow the JMS instruction that throwing exceptions
from onMessage is a programming error and don't do it.
> Unhandled RuntimeException in MessageListener#onMessage does not increment
> AMQP delivery count in AUTO_ACK
> ----------------------------------------------------------------------------------------------------------
>
> Key: QPIDJMS-388
> URL: https://issues.apache.org/jira/browse/QPIDJMS-388
> Project: Qpid JMS
> Issue Type: Bug
> Components: qpid-jms-client
> Affects Versions: 0.32.0
> Reporter: Johan Stenberg
> Priority: Minor
> Attachments: QpidJms388_RuntimeExectionInOnMessageTest.java
>
>
> The JMS spec states: "The result of a listener throwing a RuntimeException
> depends on the session's acknowledgment mode. AUTO_ACKNOWLEDGE or
> DUPS_OK_ACKNOWLEDGE: the message will be immediately redelivered. ... The
> 'JMSRedelivered' message header field will be set, and the
> 'JMSXDeliveryCount' message property incremented, for a message redelivered
> under these circumstances."
> Currently qpid-jms however is not incrementing the deliveryCount or setting
> the redelivered message header to true when a listener throws a
> runtimeexception while in AUTO_ACK.
> This results in "jms.redeliveryPolicy.maxRedeliveries" being ignored and
> endless redelivery attempts.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]