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 simplyorg.springframework.boot:spring-boot-starter-jdbc
withspring.datasource.xxx
configurations inapplication.properties
failed. Probably because oforg.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
Before running the service locally, you will need the following:
- Zulu OpenJDK 17
- Docker & Docker-compose
- Gradle
- Makefile
- grpcurl
./gradlew clean build --info
make up-local && ./gradlew clean bootRun --info
grpcurl --plaintext -d '{}' localhost:8000 acme.process_design.v1.QueryService/ListSkills
You can show internals components with the following configuration:
new Documenter(modules).writeDocumentation(Documenter.DiagramOptions.defaults(), Documenter.CanvasOptions.defaults().revealInternals());