Do I override the default configuration correctly?

Hi all
I am trying to override few default configurations from https://github.com/akka/akka-persistence-cassandra/blob/master/core/src/main/resources/reference.conf as follows:

  private def withStoreOnlineConfig(): Config =
    ConfigFactory.parseString(
      s"""akka.persistence.journal.plugin = "cassandra-journal"
         |cassandra-journal.cassandra-snapshot-store.contact-points = ["${cassandra.getContainerIpAddress}"]
         |cassandra-journal.cassandra-snapshot-store.port = ${cassandra.getMappedPort(9042)}""".stripMargin)

The question is, do I override it correctly?

Thanks

Hey there,

The cassandra-journal is superfluous in the last 2 options you’re overriding. Here’s a redacted version of your example, that overrides the default values defined in the reference.conf:

s"""akka.persistence.journal.plugin = "cassandra-journal"
         |cassandra-snapshot-store.contact-points = ["${cassandra.getContainerIpAddress}"]
         |cassandra-snapshot-store.port = ${cassandra.getMappedPort(9042)}""".stripMargin)
1 Like