activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torsten Mielke (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-3650) Only 7 retries after XA Rollback
Date Wed, 04 Jan 2012 13:25:38 GMT

    [ https://issues.apache.org/jira/browse/AMQ-3650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13179468#comment-13179468
] 

Torsten Mielke commented on AMQ-3650:
-------------------------------------

The fixed amount of retries is expected. Rather than retrying forever even in the case where
the TX would always fail for the particular msg, the msg is moved to ActiveMQ.DLQ after the
retries are exhausted. If not moved, the repeatedly failing transaction may prevent other
messages on the queue from being processed. 
The number of redeliveries should be configurable: http://activemq.apache.org/redelivery-policy.html


                
> Only 7 retries after XA Rollback
> --------------------------------
>
>                 Key: AMQ-3650
>                 URL: https://issues.apache.org/jira/browse/AMQ-3650
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: activemq-camel
>    Affects Versions: 5.5.1
>         Environment: MacOS X Lion but should also happen on other operation systems
>            Reporter: Sören Meier
>
> If I put a message on a queue an receive those message inside a xa session the message
will only be received 7 times if I rollback the session after having received the message.
I would expect that the message will be received as long as that message does not time out.
I thought there might be a configuration option to change that behaviour but I have not found
anything like that.
> You may reproduce the Error using the atomikos transaction manager like this:
>        public void testTest() throws Exception{
>       System.setProperty("com.atomikos.icatch.service", "com.atomikos.icatch.standalone.UserTransactionServiceFactory");
>       System.setProperty("com.atomikos.icatch.no_file", "true");
>       UserTransactionManager transactionManager = new UserTransactionManager();
>       transactionManager.init();
>       ActiveMQXAConnectionFactory activeMQXAConnectionFactory = new ActiveMQXAConnectionFactory("tcp://localhost:61616");
>       XAConnection xaConn = activeMQXAConnectionFactory.createXAConnection();
>       
>       xaConn.start();
>       Session session = xaConn.createSession(false, Session.AUTO_ACKNOWLEDGE);
>       session.createProducer(session.createQueue("testQueue")).send(session.createTextMessage("tests"),DeliveryMode.NON_PERSISTENT,1,0);
>       session.close();
>       for (int i=0;i<100;i++) {
>          transactionManager.begin();
>          XASession xaSession = xaConn.createXASession();
>          transactionManager.getTransaction().enlistResource(xaSession.getXAResource());
>          MessageConsumer consumer = xaSession.createConsumer(xaSession.createQueue("testQueue"));
>          Message receive = consumer.receive(3000);
>          assertNotNull(receive);
>          transactionManager.rollback();
>          consumer.close();
>       }
>       
>       
>    }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message