activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Aioanei (JIRA)" <>
Subject [jira] Created: (AMQ-906) Exception does not lead to redelivery for AUTO_ACKNOWLEDGE
Date Thu, 31 Aug 2006 14:49:23 GMT
Exception does not lead to redelivery for AUTO_ACKNOWLEDGE

                 Key: AMQ-906
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 4.0.1
            Reporter: Daniel Aioanei

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(
	at org.jencks.LocalTransactionEndpoint.onMessage(
	at org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(
	at org.apache.activemq.ra.MessageEndpointProxy.onMessage(
	at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$ Source)

Looking in the ActiveMQ source code I think the problem might be in these lines:

            try { 
            } catch ( Throwable e ) {  
                // TODO: figure out proper way to handle error.
                log.error("error dispatching message: ",e);


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:

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.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message