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

Mattias Jiderhamn commented on AMQ-3059:
----------------------------------------

I've set up a test case to demonstrate the problem here: 
https://github.com/mjiderhamn/activemq-suspend-retry

The behaviour seems to differ a bit depending on the application server / JTA 
implementation, so I've included two different test cases for Atomikos and 
Bitronix.

Resin - which we are using - seems to behave like the Bitronix test case. 
According to my investigations, the problem in that case is caused by the fact 
that org.apache.activemq.TransactionContext.start() sets the synchronizations 
to null, which means the sync added in 
org.apache.activemq.ActiveMQMessageConsumer.registerSync() is forgotten. The 
effect seems to be that even though the tx is rolled back, the message is still 
ack:ed as having been received.

While digging I came across commit 1034430 
(https://fisheye6.atlassian.com/changelog/activemq?cs=1034430) referring to 
AMQ-3022. Previous to that commit, a tx resume would cause an exception, which 
from my perspective would have been much better, so that the lack of support 
for suspend/resume would have been easily detected rather being silently 
ignored with the effect that messages dissappear. I therefore suggest at least 
reverting 1034430 until proper suspend/resume has been implemented.
                
> Provide support for suspend/resume of transactions 
> ---------------------------------------------------
>
>                 Key: AMQ-3059
>                 URL: https://issues.apache.org/jira/browse/AMQ-3059
>             Project: ActiveMQ
>          Issue Type: New Feature
>          Components: Broker
>    Affects Versions: 5.0.0, 5.1.0, 5.2.0, 5.3.0, 5.3.1, 5.3.2, 5.4.0, 5.4.1
>            Reporter: Andrei Stefan
>
> Suspend/resume of transactions is not supported in ActiveMQ at the moment 
> (https://issues.apache.org/jira/browse/AMQ-3022). There are situations where 
> this feature is useful and has a valid usage: 
> http://jira.codehaus.org/browse/BTM-87

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to