Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

durable_state.schemaName is ignored #657

Open
kam-dev-35 opened this issue Jun 11, 2022 · 1 comment
Open

durable_state.schemaName is ignored #657

kam-dev-35 opened this issue Jun 11, 2022 · 1 comment

Comments

@kam-dev-35
Copy link

Versions used

Akka version: 2.6.19

Expected Behavior

jdbc-durable-state-store {
use-shared-db = "slick"

tables {
durable_state {
tableName = "durable_state"
schemaName = "strategy_service"
}
}
}

I have a schema per microservice. And I'd like to use specific schema - "strategy_service"

Actual Behavior

Schema name is ignored. org.postgresql.util.PSQLException: ERROR: relation "durable_state" does not exist. If I create table in "public" everything works well.

Relevant logs

akka.persistence.typed.state.internal.DurableStateStoreException: Failed to persist state with sequence number [1] for persistenceId [Subscription|39349933-d95d-4761-8083-b212442150f1]
Caused by: org.postgresql.util.PSQLException: ERROR: relation "durable_state" does not exist

Reproducible Test Case

application.conf:
akka {
persistence {
state {
plugin = "jdbc-durable-state-store"
# Enable the line below to automatically start the snapshot-store when the actorsystem is started
# auto-start-snapshot-stores = ["jdbc-snapshot-store"]
}
}
}

akka-persistence-jdbc {
shared-databases {
slick = ${slick.dbs.default}
}
}

jdbc-durable-state-store {
use-shared-db = "slick"

tables {
durable_state {
tableName = "durable_state"
schemaName = "strategy_service"
}
}
}

build.sbt:
val akkaVersion = "2.6.19"

libraryDependencies ++= Seq(
ws,
"com.typesafe.akka" %% "akka-stream-kafka" % "3.0.0",
"org.postgresql" % "postgresql" % "42.3.4",
"com.typesafe.play" %% "play-slick" % "5.0.2",
"com.lightbend.akka.management" %% "akka-management-cluster-http" % "1.1.3",
"com.lightbend.akka.management" %% "akka-management-cluster-bootstrap" % "1.1.3",
"com.typesafe.akka" %% "akka-discovery" % akkaVersion,
"com.lightbend.akka.discovery" %% "akka-discovery-kubernetes-api" % "1.1.3",
clusterSharding,
"com.typesafe.akka" %% "akka-persistence-typed" % akkaVersion,
"com.typesafe.akka" %% "akka-persistence-query" % akkaVersion,
"com.lightbend.akka" %% "akka-persistence-jdbc" % "5.0.4"
)

@patriknw
Copy link
Member

patriknw commented Jul 8, 2022

@kam-dev-35 Thanks for reporting. Would you be able to create a pull request fixing the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants