Questions tagged [r2dbc]

R2DBC (Reactive Relational Database Connectivity) is an SPI which enables interacting with SQL database servers by executing SQL statements using a non-blocking reactive programming model with the Java programming language.

R2DBC is a Java-based, open source data access technology.

This technology is an SPI (Service Provider Interface) for the Java programming language that defines how a client may access a database using reactive programming. It specifies SPI methods for executing queries using a non-blocking driver. R2DBC is oriented towards relational databases.

Online resources

379 questions
0
votes
3 answers

R2dbc not working with h2 database using tcp

I try to use h2 with r2dbc using the docker container oscarfonts/h2. By default when using this container, we have to use tcp protocol, When I try to use it with r2dbc. I get the clear following error message : Retrying to get database connection…
Xavier Bouclet
  • 922
  • 2
  • 10
  • 23
0
votes
2 answers

How to set multiple data sources in Spring Data R2DBC

I am using spring data r2dbc in my new project and need to connect multiple data sources like A data source and B data source. Is there a way to connect multiple data sources using r2dbc? Could I get an example or a document if there is a way? My…
devsh
  • 331
  • 1
  • 4
  • 10
0
votes
0 answers

Right way to execute two queries in sequence in r2dbc

I work with R2DBC and i need to execute query, whiсh on request returns Flux of my entities and after that i need to convert this entities to DTO's,but to create an DTO i need to make another query to the database for each entity, which returns…
0
votes
1 answer

Save in ReactiveCrudRepository not inserting or updating records

As stated in the title I'm not been able to insert or update records in my Postgres database. I just started working with spring and kotlin so there might be some pretty basic configuration that it's missing. Thanks in advance Here is my code…
0
votes
1 answer

How to convert databaseClient result into object?

I have a task to insert entity through r2dbc database client, and convert the result (map) into the entity. I want to do it this way: databaseClient.insert().into(ApplicationData.class) .using(applicationData) …
voipp
  • 1,243
  • 3
  • 18
  • 31
0
votes
0 answers

r2dbc-mssql generatedKey return type numeric

The sample stack: Spring Data R2dbc 1.0.0.RELEASE, R2dbc Mssql 0.8, the complete code is here. The init script: use tempdb; IF OBJECT_ID(N'dbo.posts', N'U') IS NULL BEGIN CREATE TABLE posts ( id BIGINT NOT NULL IDENTITY(1,1) PRIMARY…
Hantsy
  • 8,006
  • 7
  • 64
  • 109
0
votes
1 answer

Batch insert support

I try to perform a batch insert using r2dbc. I have see that with DatabaseClient from spring boot, it's not yet possible. I have try to do that using R2DBC SPI Statement and the and method, like that: Mono.from(this.factory.create()) …
deblockt
  • 91
  • 5
0
votes
2 answers

INSERT contains no values with spring-data-r2dbc

When I try to insert an entity with only an id using spring r2dbc data I got the following exception: Exception while fetching data (addChat) : INSERT contains no values java.lang.IllegalStateException: INSERT contains no values at…
GUISSOUMA Issam
  • 2,572
  • 2
  • 16
  • 27
0
votes
0 answers

Spring data with postgress and r2dbc does not work

I am trying to run simple spring boot application with spring data and r2dbc but when i run select query it does return any record. Configuration @Configuration @EnableR2dbcRepositories("com.ns.repository") public class R2DBCConfiguration extends…
0
votes
1 answer

Java, Postgres, Redis: PostConstruct not completely working?

I would like to populate Redis from a Postgres table, and have a method that works. I would like this method to be run on application startup. However, when I try to use @PostConstruct, it seems to run the method but not successfully. I'm using…
Matt Takao
  • 2,406
  • 3
  • 16
  • 30
0
votes
1 answer

R2DBC database client not calling doOnSuccess or terminating for nested calls

The code is reaching the "Populating migrations to be executed" log. Yet none of the AAA, EEE and CCC logs are being reached so no code inside the doOnSuccess is being run. Any help on how I can solve this problem will be…
0
votes
1 answer

Batch insert in kotlin with spring-fu

I looked at this example: https://github.com/spring-projects/spring-fu/blob/cb7c60eae7c022fe066cfe8bf7fbfb752b9dd64b/samples/kofu-coroutines-r2dbc/src/main/kotlin/com/sample/Repositories.kt#L26 suspend fun save(user: User)= …
levant pied
  • 3,886
  • 5
  • 37
  • 56
0
votes
1 answer

Unsatisfied dependency expressed through constructor parameter 1 with userRepository

In a spring boot application who are reactive and use jwt, in my spring-cloud-gateway, I have this code. @EnableDiscoveryClient @SpringBootApplication public class GatewayServiceApplication { public static void main(String[] args) { …
-1
votes
1 answer

Java R2DBC connection reset by peer

When external user call create method sometimes client getting Failed to obtain R2DBC Connection error. Cauase: io.netty.channel.unix.Errors$NativeIoException: recvAddress(..) failed: Connection reset by peer My pool configuration: url:…
-1
votes
2 answers

Spring Boot Reactive java app is slower simple spring boot app. Why?

I made two apps with similar code on Spring Boot. Reactive Netty spring boot webflux r2dbc. Nonreactive Tomcat spring boot postgres. I expect reactive one is faster or has the same speed. But it is slower 6th time. I don't see any blocks there.…
1 2 3
25
26