Questions tagged [spring-data-r2dbc]

Spring Data R2DBC is a module of Spring Data based on R2DBC R2DBC stands for Reactive Relational Database Connectivity.

See https://spring.io/projects/spring-data-r2dbc for more information.

412 questions
4
votes
1 answer

support for sequence generation in r2dbc?

I am trying to find whether there is any support for identifier generation support we can use with R2DBC. Similar to @GeneratedValue provided by hibernate for jdbc. I know that spring-data-r2dbc doesn't support identifier generation yet.
4
votes
1 answer

Spring R2dbc: Is there are way to get constant stream from postgresql database and process them?

I want to fetch records for newly created records in a table in postgresql as a live/continuous stream. Is it possible to use using spring r2dbc? If so what options do I have? Thanks
4
votes
1 answer

Failed to obtain R2DBC, this publisher does not support multiple subscribers

I try to run r2dbc application with spring-boot-starter-data-r2dbc and oracle-r2dbc but it gives me an exception " org.springframework.dao.DataAccessResourceFailureException: Failed to obtain R2DBC Connection; nested exception is…
4
votes
1 answer

Mapping to JSON Fields with Spring Data R2DBC and Reactive MySQL Driver

I'm trying to use JSON data type to store json data in a specific column in a MySQL database. I followed this guide, and got storing and reading JSON working fine but now I get this error when trying to save another entity that have a boolean…
Eyal Ringort
  • 601
  • 6
  • 19
4
votes
0 answers

Why Spring Data r2dbc not detecting Transaction manager by method return type when using @Transactional annotation?

In my project we need to use 2 transaction managers(for JPA and R2DBC), both of them are initialized with auto-configuration(two beans with names transactionManager and connectionFactoryTransactionManager), documentation(link) says that: Methods…
antoniOS
  • 370
  • 2
  • 9
4
votes
2 answers

Reactive R2DBC for simple RESTful calls

Since R2DBC is reactive and non blocking I would like to understand the benefit of using R2DBC in a simple RESTful CRUD service Assume a spring boot application is exposing a RESTful service using a repository below public interface…
lives
  • 1,243
  • 5
  • 25
  • 61
4
votes
1 answer

WebFlux and Kotlin use ReactiveCrudRepository in multimodule application

I have an example SpringBoot app in Kotlin and WebFlux. I divided whole application into modules (as I'm used to from asp.net). Modules: core (models, DTO, helpers, etc...) referenced everywhere data (repositories, tables...) referenced only in…
Michal
  • 803
  • 2
  • 9
  • 26
4
votes
0 answers

R2DBC - PostgreSQL - Cannot exchange messages because the request queue limit is exceeded

Libraries: r2dbc-postgresql-0.8.6.RELEASE r2dbc-pool-0.8.5.RELEASE r2dbc-spi-0.8.3.RELEASE postgresql-42.2.18 List item Problem: I tried to bulk insert using R2DBC (PostgreSQL) with code as below: @Override public Flux test(List users)…
4
votes
2 answers

How to enable connection pooling with spring-boot-starter-data-r2dbc?

I have a Spring Boot application with data-r2dbc dependency. I use PostgreSQL as DB. So I already have in place the following dependencies (gradle…
fyrkov
  • 2,245
  • 16
  • 41
4
votes
1 answer

Connection-reuse and transactions (relationship)

How does R2DBC implement transaction-handling. As far as I know, JDBC use one connection for one transaction. So in Spring MVC we have the following mapping: 1 request : 1 thread : 1 transaction : 1 connection. What is the mapping in Webflux with…
4
votes
2 answers

How can I substitute @PrePersist in Spring data r2dbc

I am using spring-boot-starter-data-r2dbc (version 1.1.3) module in Spring Webflux application. I want to add entity lifecycle callbacks to my persistence layer. With Spring Data JPA it was possible with annotations like @PrePersist, @PreUpdate,…
4
votes
6 answers

Spring does Update instead of save

I am trying to code a little reactive backend with R2DBC and run into a thing I do not really understand. I dont know why but Spring is trying to update an entry instead of saving it to the database. My User…
Yasin Eraslan
  • 171
  • 2
  • 13
4
votes
2 answers

TestContainers, Spring Webflux, JUnit 5, MySQLR2DBCDatabaseContainer using @DynamicPropertySource

I'm trying to do the following; but using org.testcontainers.containers.MySQLR2DBCDatabaseContainer can anyone show me how this can be achieved, as MySQLR2DBCDatabaseContainer doesn't seem to have the following…
4
votes
1 answer

Getting MappingException when reading TINYINT value from H2 database as boolean/Boolean

I am using R2DBC H2 for integration testing my reactive application (which is based on Spring Webflux , Java). Versions Driver: io.r2dbc:r2dbc-h2:0.8.4.RELEASE (Spring boot 2.3.2.RELEASE) Java: 11 OS: Mac I have a table defined like this: CREATE…
Abhinaba Chakraborty
  • 3,488
  • 2
  • 16
  • 37
4
votes
1 answer

Spring Data Reactive R2DBC Pagination

Spring Data Reactive does not support Page as a return type. I'm trying to implement this using two different queries (one to get result list and another to get total count) from Service layer. The first query gives the contents as Flux and…
krishnakumarp
  • 8,967
  • 3
  • 49
  • 55