softwaremill / mqperf

https://softwaremill.com/mqperf/
Apache License 2.0
145 stars 37 forks source link

PostgresMq #114

Closed psstepniewski closed 1 year ago

psstepniewski commented 1 year ago

Implementation of PostgresMq client

Client uses r2dbc-postgres driver, implenetation of r2dbc-spi. SQL queries are executed using Spring DatabaseClient from spring-data-r2dbc project.

Each sender and receiver creates its own connection pool.

On /init endpoint client prepares the whole insert query because r2dbc does not support inserting many values in one insert. R2dbc batching will add each value with dedicated insert.

Spring DatabaseClient is used because native r2dbc does not support in condition clause. Additionally it simplifies transaction management and r2dbc usage. There is more recent version of spring-data-r2dbc project but it requires jdk-17 to work.

Required fields in mqConfig section:

psstepniewski commented 1 year ago

outdated, recent version is in postgres-spring branch