Connect
SQL password and Entra client credentials, with the same login retry for a paused Azure SQL database.
mssqllib is a public-domain R2DBC driver for Microsoft SQL Server. It speaks TDS over JDK NIO sockets and Reactor. It does not use Netty.
The Maven artifact is r2dbc-mssql. The driver id is mssql, and the URL scheme is r2dbc:mssql://. It needs Java 17 and implements io.r2dbc:r2dbc-spi:1.0.0.RELEASE.
| groupId | org.mssqllib.r2dbc.mssql |
|---|---|
| artifactId | r2dbc-mssql |
| version | 1.0.1 |
| Java package | org.mssqllib.r2dbc.mssql |
| Provider | org.mssqllib.r2dbc.mssql.TdsConnectionFactoryProvider |
| JPMS module | org.tdslib.r2dbc.mssql |
This is a new TDS implementation. It is not a fork of io.r2dbc:r2dbc-mssql, and it is not an upstream of that driver. It is not affiliated with Microsoft or with the R2DBC project.
The artifact id is intentional. A groupId and version change is what substitutes this jar for io.r2dbc:r2dbc-mssql. Do not put both jars on one classpath. Both register io.r2dbc.spi.ConnectionFactoryProvider.
Two login paths are implemented: SQL username and password, and federated authentication for Microsoft Entra (Azure SQL and SQL Server with Entra authentication). The driver acquires a client-credentials token with the JDK HTTP client. It does not depend on MSAL, and it does not read the process environment.
Version 1.0.1 is the current release. Version 1.0.0 shipped on 20 October 2026. See Installation and changes since 1.0.0.
Version 1.0.1 passes the R2DBC SPI TCK, io.r2dbc:r2dbc-spi-test:1.0.0.RELEASE. The latest run is 34 tests, 0 failures, 0 errors, and 7 skipped. The skips are generated values, a few argument checks whose exception type still differs from the kit, and incomplete batch or binding detection. The list is on the project page.
The default leaves materializeLobs false. varchar(max), nvarchar(max), varbinary(max), and xml are then a live Clob or Blob. The integration suite calls this unrestricted mode. io.r2dbc:r2dbc-mssql 1.0.7 buffers each of those values before it emits the row.
materializeLobs=true is the compatibility setting. It buffers those values and accepts String and byte[] inside Result.map, which is how code written for io.r2dbc:r2dbc-mssql reads them. There is no separate option named compat. The testing profile compat=true sets materializeLobs.
Initial testing shows roughly twice the performance of io.r2dbc:r2dbc-mssql. The project attributes that gap, and the streaming behavior, to the JDK NIO design. The other driver is built on Netty. This repository does not include the benchmark program, so the factor is an initial result, not a guaranteed ratio. The mechanism is on the architecture page.
SQL password and Entra client credentials, with the same login retry for a paused Azure SQL database.
Keep the artifact id, change the groupId, and set materializeLobs when existing code reads large values as strings.