pgjdbc / r2dbc-postgresql

Postgresql R2DBC Driver
https://r2dbc.io
Apache License 2.0
1.01k stars 177 forks source link

Upgrade to Netty 5 #553

Open hantsy opened 1 year ago

hantsy commented 1 year ago

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.

linghengqian commented 1 year ago
mp911de commented 1 year ago

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.

hantsy commented 1 year ago

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?

Squiry commented 1 year ago

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.