Hi,
as far as I can tell there’s no way to configure a separate connection factory to be used for the query side of r2dbc projections. There’s only akka.projection.r2dbc.use-connection-factory which is used for both, the offstore store (read&write) and the projection queries (read only).
Could it make sense to separate those two, so hot standby replicas (which are read only) can be used for the projection queries and hence lower the load on the primary postgres node?
I think you can achieve that by configuring a separate Akka r2dbc config block for the query and pass the config path to that as readJournalPluginId parameter when you create the source provider with EventSourcedProvider.eventsBySlices.
Ah thanks a lot! I didn’t consider this way of configuration. I guess it might still be nice to configure this as a default instead of having to touch every projection. Handy nevertheless. Cheers