Description
Since we have two cases in Spring Data already where transactions are supported with reactive drivers - namely for MongoDB and R2DBC -, let's revisit our core transaction management abstraction and our @Transactional
support for reactive scenarios.
The transaction interceptor could automatically detect reactive scenarios through a Publisher
return type from the method it is supposed to proxy and automatically go through a reactive transaction management SPI in that case. Such an SPI has been prototyped for MongoDB and R2DBC already, so it's mostly a matter of rolling it into Spring Framework proper.
Configuration-wise, the existing transaction configuration elements would largely still apply, just pointing to a reactive transaction manager implementation instead of a classic PlatformTransactionManager
.