activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AMQ-906) Exception does not lead to redelivery for AUTO_ACKNOWLEDGE
Date Mon, 01 Mar 2010 15:51:44 GMT

     [ https://issues.apache.org/activemq/browse/AMQ-906?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gary Tully resolved AMQ-906.
----------------------------

       Resolution: Fixed
    Fix Version/s:     (was: NEEDS_REVIEWED)
                   5.4.0

fix committed in svn r916936

> 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: 5.4.0
>
>         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.


Mime
View raw message