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
0
votes
0 answers

Convert and collect Flux as database entities and save to database, after return in controller

I am migrating to the reactive stack and I am having difficulties working with the reactive approach. The task is to get data from a remote service in the Flux format, convert each GroupDTO and collect them into a List, then…
0
votes
0 answers

Reemition of entities after update (Spring data, R2DBC, RxJava)

I'm trying to use the reactive way of database communication and my expectation was, that when I observe some entity from database, then always when it will change, I'll get update on it. But the stream completes right after the entities are…
michalp
  • 83
  • 5
0
votes
1 answer

How would I instrument an R2DBC for Spring Cloud Sleuth Zipkin?

For a normal data source I would do the following using P6Spy @Configuration @Order(LOWEST_PRECEDENCE) @Slf4j public class DataSourceBeanPostProcessor implements BeanPostProcessor { @Override public Object postProcessAfterInitialization(Object…
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265
0
votes
1 answer

How would you cache in R2DBC?

I am trying to implement something like this Spring boot populating cache used by findById method with findAll method but with R2DBC. However, it does not appear to work as I am returning a Mono. @Cacheable("stores",key = "#storeId") Mono
Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265
0
votes
0 answers

WebFlux Kotlin Coroutine R2DBC CoroutineCrudRepository pagination return all objects

webflux r2dbc repository No example was found to pagination return the all object . Is there an appropriate way? Let me know if you have a good example. My service stack spring boot webflux, r2dbc, mysql, kotlin, kotlin coroutine There is a…
0
votes
1 answer

Reactive database test not behaving as expected

I am still a newbie on reactive programming, and I am running a test program using Spring Boot R2DBC on a MariaDB database. The database that I am using is pretty simple: CREATE DATABASE IF NOT EXISTS `bugdemo`; USE `bugdemo`; CREATE TABLE IF NOT…
Factor Three
  • 2,094
  • 5
  • 35
  • 51
0
votes
1 answer

Get the Entity name in a generic R2dbcRepository

I would like to generate a query with my R2dbcRepository. In Spring Data JPA the documentation says to use #{#entityName} to get an Entity if a repository is generic, however I can't find the equivalent in R2DBC. I'm using a H2 in memory database:…
Michael
  • 3,411
  • 4
  • 25
  • 56
0
votes
1 answer

Spring R2DBC How delete a relation entity

I have two entities A & B and a many-many relation entity AB. How to implement the following sequence in the most appropriate react way without terminal actions Fetch AB by idAB Fetch A by AB.idA, update & save A Fetch B by Ab.idB, update & save…
ysa
  • 141
  • 1
  • 7
0
votes
1 answer

Does the R2DBC connection pool reuse DB connections?

I am building a spring application using R2DBC and MySQL. Running an application by deploying it on a server, I noticed a few surprising things. MySQL connection id grows very fast. my database server already exceeded 1 million connection IDs in 10…
youngminz
  • 1,364
  • 2
  • 14
  • 23
0
votes
1 answer

How to setup r2dbc transaction properly

I am using spring-r2dbc and h2 for writing a transaction but am not sure about the proper transaction boundary setup. @SpringBootApplication @EnableTransactionManagement public class R2dbcApplication { public static void main(String[] args) { …
user3747396
  • 141
  • 12
0
votes
0 answers

R2DBC-MSSQL how to connect to a database

I am trying to connect to my local SQL Server with R2DBC, unfortunately, I do not know where I am going wrong, I have a lot of experience with R2DBC, I use it all the time with other databases but this is my first time with MSSQL, below is my MSSQL…
0
votes
0 answers

Spring boot 2.6.6 MSSQL connection issue

After upgrading to spring boot 2.6.6 in production, constantly experiencing db connection issues like com.microsoft.sqlserver.jdbc.SQLServerException: The query has timed out. The query has timed out. connection is broken current version for jdbc…
0
votes
1 answer

How can I convert Mono> to List into reactive programming spring boot?

I have the following code this returns a Mono and I need a List var test = repo.findAll().collectList().map( a-> { return a; }); spring.boot.version 2.7.0
0
votes
2 answers

Problem with gradle when importing io.r2dbc.postgresql.codec

Every time i try to build or run from gradle (gradle bootRun or ./gradlew bootRun), while importing io.r2dbc.postgresql.codec.Json, i get this error: Stack trace > Task :compileJava…
0
votes
0 answers

Spring data R2DBC with H2 database Failed to obtain R2DBC Connection

I am developing a spring command line application where I connect to a db using data r2dbc. For information, my application is written in Kotlin. the pom file contains: org.springframework.boot
vivi
  • 163
  • 13