This is a read-only copy of the MariaDB Knowledgebase generated on 2025-02-22. For the latest, interactive version please visit https://mariadb.com/kb/.

About MariaDB Connector/R2DBC

Overview

Java developers can use MariaDB Connector/R2DBC to connect to MariaDB database products using the Reactive Relational Database Connectivity (R2DBC) API. R2DBC operations are non-blocking, which makes the R2DBC API more scalable than Java's standard JDBC API. MariaDB Connector/R2DBC has a native R2DBC implementation and the Spring Data R2DBC framework.

ConnectorMariaDB Connector/R2DBC
Supported Versions1.2
Programming LanguageJAVA
Programming Language VersionJava 8+
APIR2DBC 0.9.1 , R2DBC 1.0.0
Supports TLSYes
Supports Connection PoolsYes
LicenseApache 2.0

End-of-Life (EOL) Versions

The following versions of MariaDB Connector/R2DBC have reached the End of Life and are no longer supported:

  • MariaDB Connector/R2DBC 1.0
  • MariaDB Connector/R2DBC 1.1

Users are encouraged to upgrade to the next available supported version.

Maven artifacts

Current connector supporting 1.0.0 R2DBC spec is:

<dependency>
    <groupId>org.mariadb</groupId>
    <artifactId>r2dbc-mariadb</artifactId>
    <version>1.2.x</version>
</dependency>

To support R2DBC 0.9.1 spec that is incompatible with 1.0.0 spec:

<dependency>
    <groupId>org.mariadb</groupId>
    <artifactId>r2dbc-mariadb-0.9.1-spec</artifactId>
    <version>1.2.x</version>
</dependency>

Benefits of R2DBC

The R2DBC API relies on reactive data streams, which provide many benefits over standard JDBC:

  • Reactive: R2DBC uses an event-driven, non-blocking, and functional programming model.
  • Scalable: R2DBC is more scalable than standard JDBC because it allows the runtime to handle concurrency and scheduling.
  • Fast: R2DBC streams results, which can improve performance.
  • Efficient: R2DBC uses deferred execution and flow control to ensure its operations are performed efficiently.
  • Simple: R2DBC is designed to make common usage patterns simple to implement for developers.

Framework-Specific Documentation

For details on how to use MariaDB Connector/R2DBC, choose a supported framework:

ParameterDescription
Native R2DBCThe native implementation of R2DBC can be used to connect using MariaDB Connector/R2DBC from within your Java application.
Spring Data R2DBCSpring Data implementation of R2DBC allows you to connect using MariaDB Connector/R2DBC using the Spring Framework.
FeatureNative R2DBCSpring Data R2DBC
ReactiveYesYes
ScalableYesYes
FastYesYes
EfficientYesYes
Executes SQLYesYes
Integrates with Spring FrameworkNoYes
Spring Data: DatabaseClientNoYes
Spring Data: RepositoriesNoYes
Spring Data: Object MappingNoYes
Spring Data: Transaction ManagementNoYes

Resources

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.