Skip to content

A project showing issue witf LogNet grpc springboot starter and R2DBC usage

Notifications You must be signed in to change notification settings

vincentditlevinz/api-domains-issue

Repository files navigation

Issue

Did not find how to make Modulith transactional events work in a R2DBC context. We tested:

  • org.springframework.experimental:spring-modulith-jdbc required a jdbcTemplate to work properly
  • Adding org.springframework.boot:spring-boot-starter-data-jdbc or simply org.springframework.boot:spring-boot-starter-jdbc with spring.datasource.xxx configurations in application.properties failed. Probably because of org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration which works only when @ConditionalOnMissingBean(type = "io.r2dbc.spi.ConnectionFactory") is satisfied...
  • So we provided a Datasource and a jdbcTemplate manually. But the reactive transaction manager throw an exception because of org.springframework.experimental:spring-modulith-jdbc : java.lang.IllegalStateException: Cannot apply reactive transaction to non-reactive return type: interface java.util.List

We are waiting for:

In the meantime we only use non-transactional events

Getting started

Before running the service locally, you will need the following:

  • Zulu OpenJDK 17
  • Docker & Docker-compose
  • Gradle
  • Makefile
  • grpcurl

Build the project

./gradlew clean build --info

Run the project

make up-local && ./gradlew clean bootRun --info
grpcurl --plaintext -d '{}' localhost:8000 acme.process_design.v1.QueryService/ListSkills

Tips

You can show internals components with the following configuration:

new Documenter(modules).writeDocumentation(Documenter.DiagramOptions.defaults(), Documenter.CanvasOptions.defaults().revealInternals());

About

A project showing issue witf LogNet grpc springboot starter and R2DBC usage

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published