Open basecade opened 4 years ago
Well we do have a free trial if you want to try the latest stable customer version?
Hi,
Thank you for your reply. So you think my issue is not supported yet in the free version of atomikos? But yes, I would like to try the latest stable version. "Customer version" is that "ExtremeTransactions"?
Hi, yes it is.
You can get it here:
https://www.atomikos.com/Main/ExtremeTransactionsFreeTrial
Stay safe! Guy
Hi,
I have a ActiveMQ where I have setup Redelivery on the client side. With a simple consumer it works as expected with the below configurations:
So the above works as expected and the message is redelivered with the ExponentialBackOff strategy.
BUT it goes sideways when the message consumer (onMessageReceived) calls a method on a class that sends a message to another queue in a new transaction. Then the message is not redelivered if the exception is thrown after the new transaction have been committed, ex:
In the stacktrace below it is seen that the org.apache.activemq.TransactionContext.synchronizations are nulled when sending the message in the new transaction. The TransactionContext.synchronizations contains the ActiveMQMessageConsumer that is used to receive the message and is needed for the redelivery after the exception is thrown. When this is cleared the message is not redelivered: https://ibb.co/ch7NqQ8 (stacktrace)
It is the method com.atomikos.datasource.xa.session.BranchEnlistedStateHandler.checkEnlistBeforeUse() that detects that the transaction context is different and throws an exception that is catched in SessionHandleState.notifyBeforeUse():
Then a new context is created and currentContext.checkEnlistBeforeUse(ct) is called which ends up clearing the TransactionContext.synchronizations
There is a comment in BranchEnlistedStateHandler.checkEnlistBeforeUse(): "//TODO check: what if subtransaction? Possible solution: ignore if serial_jta mode, error otherwise."
I have a subtransaction and have "com.atomikos.icatch.serial_jta_transactions" set to true. Am I just unlucky to have hit something that is not supported yet?
Versions used: "org.springframework:spring-jms:5.1.10.RELEASE", "com.atomikos:transactions:5.0.3", "org.apache.activemq:activemq-client:5.15.10"
Have tried to bump to newest versions, but didn't make a difference.