diff --git a/persistence/src/main/resources/reference.conf b/persistence/src/main/resources/reference.conf index 2d9a16805..10c37ed42 100644 --- a/persistence/src/main/resources/reference.conf +++ b/persistence/src/main/resources/reference.conf @@ -55,6 +55,39 @@ evolutiongaming.kafka-journal.persistence { json-codec = default } + snapshot { + + class = "akka.persistence.kafka.journal.CassandraSnapshotStore" + + plugin-dispatcher = "evolutiongaming.kafka-journal.persistence.dispatcher" + + persistence-id-to-key { + impl = "constant-topic" # valid values: constant-topic, split + constant-topic { + topic = "journal" + } + } + + cassandra { + client { + name = "journal" + query { + fetch-size = 1000 + consistency = "LOCAL_QUORUM" + default-idempotence = true + } + } + } + + circuit-breaker { + max-failures = 100 + call-timeout = 130s // should be higher than producer.delivery-timeout + reset-timeout = 1m + } + + json-codec = default + } + dispatcher { type = "Dispatcher" executor = "fork-join-executor" @@ -64,4 +97,4 @@ evolutiongaming.kafka-journal.persistence { parallelism-max = 32 } } -} \ No newline at end of file +} diff --git a/tests/src/test/resources/application.conf b/tests/src/test/resources/application.conf index c9462aa72..f280f0736 100644 --- a/tests/src/test/resources/application.conf +++ b/tests/src/test/resources/application.conf @@ -6,7 +6,7 @@ akka { log-dead-letters-during-shutdown = off persistence { journal.plugin = "evolutiongaming.kafka-journal.persistence.journal" - snapshot-store.plugin = "akka.persistence.no-snapshot-store" + snapshot-store.plugin = "evolutiongaming.kafka-journal.persistence.snapshot" } test { @@ -58,4 +58,4 @@ evolutiongaming.kafka-journal { cassandra = ${evolutiongaming.kafka-journal.cassandra} } -} \ No newline at end of file +} diff --git a/tests/src/test/scala/akka/persistence/kafka/journal/SnapshotSpec.scala b/tests/src/test/scala/akka/persistence/kafka/journal/SnapshotSpec.scala new file mode 100644 index 000000000..76af6dc32 --- /dev/null +++ b/tests/src/test/scala/akka/persistence/kafka/journal/SnapshotSpec.scala @@ -0,0 +1,10 @@ +package akka.persistence.kafka.journal + +import akka.persistence.snapshot.SnapshotStoreSpec +import com.typesafe.config.ConfigFactory + +class SnapshotSpec extends SnapshotStoreSpec(ConfigFactory.load("integration.conf")) { + + override def supportsSerialization = false + +}