-
Notifications
You must be signed in to change notification settings - Fork 13
Plugin always connects to localhost #19
Comments
If you want to override the private val config = ConfigFactory.parseString(
"""
akka {
persistence.journal.plugin = "akka-persistence-redis.journal"
}
akka-persistence-redis {
redis {
host = redis
}
}
""".stripMargin
).withFallback(ConfigFactory.parseResources("reference.conf")).resolve() However I would recommend to use the standard mechanism described in the documentation |
What? I don't thinks so, it is just a fallback for the primary :
Prints :
|
Yes, because the merge overrides the specific host key you are querying. But the journal uses a substitution which default to to Try: println(config.getConfig("akka-persistence-redis.journal.redis")) Please try my solution and you will see the difference. That’s just the way the config library works. |
Hmm, I still can't make it work :
Still connecting to localhost :-/ |
Still the same problem. For your example to work, either provide your overloading in a
Another way to do it is to have a akka {
persistence.journal.plugin = "akka-persistence-redis.journal"
}
akka-persistence-redis {
redis {
host = redis
}
journal.redis = ${akka-persistence-redis.redis}
} and then just |
I see, 🤦♂️ I grasp the problem now, thank you for your help and patience @satabin |
This is very strange :
I tried to expose even
redis.host = redis
to the global scope, but I just cannot make it to connect to hostnameredis
. Any idea?The text was updated successfully, but these errors were encountered: