r2dbc-postgresql
r2dbc-postgresql copied to clipboard
Upgrade to Netty 5
I found r2dbc-postgresql depends on Netty 4.x.
In Spring 6, it added optional Netty 5 as runtime, when use Netty 5 to build a Spring WebFlux project and use R2dbc/Postgres, then in the project dependencies, Netty4 and Netty 5 coexist in the same application.
Is it possible adding Reactor Netty 5 support in this R2dbc driver. Mark io.projectreactor.netty:reactor-netty and io.projectreactor.netty:reactor-netty5 as optional, detect it in the classpath to select one.
- Personally, I hope that we will continue to maintain the minimum JDK compilation version as JDK8 until reactor-core mentions its minimum JDK compilation version to JDK11. Importing Netty 5 seems to complicate things.
We don't have an adoption timeline for Netty 4 yet. R2DBC intentionally remains with a low baseline to enable reactive database connectivity for applications that are required to remain on Java 8. With the extended support of Java 8 until 2030, there's no urgency for us to break compatibility.
We expect the Reactor Netty library for Netty to be supported for at least another 3 to 4 years. We could imagine a switch to Netty 4 for an R2DBC Postgres 2.0 major upgrade. However, with 1.0 not having yet released 1.0.0.RELEASE, we don't even need to discuss timelines for 2.0.
Ok, in one word, is it possible to add reactor-netty5(which depends on Netty 5) support and align with the new Netty 5 adoption in Spring 6?
IIRC netty 5 has another interface for buffers, so we will have to rewrite like the whole encoding/decoding layer, so no, it doesn't sound as a drop in replacement yet it is quite possible and will be done somewhere in a future anyway.