I found that when we are using exactly same propagation policy bean in different routes used together with "direct" component, then TransactionErrorHandler always propagates current transaction even if our policy is "PROPAGATION_REQUIRES_NEW".
The failing code is:
So then for each policy there is a hash code created, which then is used to verify whether current route is already transacted by this transaction policy.
This makes "PROPAGATION_REQUIRES_NEW" ignored when used with "direct" component.
So for example:
The above route suppose to work in 2 different transactions, as our propagation is REQUIRES_NEW for both of them. But due to hash code verification and optimisation, route2 will participate in same transaction as route1 instead of new.
This is rather buggy.
Will create pull request in minutes.