You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Gary Tully (JIRA)" <ji...@apache.org> on 2010/02/26 14:32:41 UTC
[jira] Assigned: (AMQ-906) Exception does not lead to redelivery
for AUTO_ACKNOWLEDGE
[ https://issues.apache.org/activemq/browse/AMQ-906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Tully reassigned AMQ-906:
------------------------------
Assignee: Gary Tully
> Exception does not lead to redelivery for AUTO_ACKNOWLEDGE
> ----------------------------------------------------------
>
> Key: AMQ-906
> URL: https://issues.apache.org/activemq/browse/AMQ-906
> Project: ActiveMQ
> Issue Type: Bug
> Affects Versions: 4.0.1
> Reporter: Daniel Aioanei
> Assignee: Gary Tully
> Fix For: NEEDS_REVIEWED
>
> Attachments: AMQ-906.test.patch.diff
>
>
> I have a message driven pojo configured configured with with auto_acknowledge, nontransactional and some persistent message in a queue. All my mdp does it to throw new RuntimeException("please retry") but unfortunately the messages are not retried:
> SEVERE: error dispatching message:
> java.lang.RuntimeException: Please retry
> at net.activem.jms.ExceptionTestOutboundMdp.onMessage(ExceptionTestOutboundMdp.java:46)
> at org.jencks.LocalTransactionEndpoint.onMessage(LocalTransactionEndpoint.java:68)
> at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
> at org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
> at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
> at org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
> at org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
> at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
> Looking in the ActiveMQ source code I think the problem might be in these lines:
> try {
> messageListener.onMessage(message);
> } catch ( Throwable e ) {
> // TODO: figure out proper way to handle error.
> log.error("error dispatching message: ",e);
> connection.onAsyncException(e);
> }
> at java.lang.Thread.run(Thread.java:595)
> found in org.apache.activemq.ActiveMQSession.
> According to JMS spec, I'd say that with auto_ack a msg should be retried in case the message listener throws an exception, even if the operation is non-transactional:
> http://java.sun.com/j2ee/1.4/docs/api/javax/jms/Session.html#AUTO_ACKNOWLEDGE
> public static final int AUTO_ACKNOWLEDGE
> With this acknowledgment mode, the session automatically acknowledges a client's receipt of a message either when the session has successfully returned from a call to receive or when the message listener the session has called to process the message successfully returns.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.