At present, Omega's timeout only stores to the database, find timeout Tx 
transactions and compensation through database scans. This may cause the commit 
of the Tx transaction after the compensation.
I think it can be improved TransactionAspect class, Terminates the execution of 
the method when the timeout and throws a custom exception

So we can control the rollback of the transaction within the method when 
timeout. I wrote an example to show my thoughts 
https://github.com/coolbeevip/playground/tree/master/timeoutaspect-demo 
<https://github.com/coolbeevip/playground/tree/master/timeoutaspect-demo>

You can use ApplicationTest to quickly verify

Any suggestion? 


Lei Zhang

Reply via email to