Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
play {
akka.actor-system = menu
modules.enabled += com.knoldus.lagom.sample.restaurant.menu.impl.MenuModule
http.secret.key = none
}
lagom.persistence.ask-timeout = 10s
menu.cassandra.keyspace = menu
cassandra.default {
## list the contact points here
contact-points = ["10.0.2.2", "10.0.2.2", "10.0.2.2"]
## override Lagom’s ServiceLocator-based ConfigSessionProvider
session-provider = akka.persistence.cassandra.ConfigSessionProvider
}
cassandra-journal {
contact-points = ${cassandra.default.contact-points}
session-provider = ${cassandra.default.session-provider}
keyspace = ${menu.cassandra.keyspace}
}
cassandra-snapshot-store {
contact-points = ${cassandra.default.contact-points}
session-provider = ${cassandra.default.session-provider}
keyspace = ${menu.cassandra.keyspace}
}
lagom.persistence.read-side.cassandra {
contact-points = ${cassandra.default.contact-points}
session-provider = ${cassandra.default.session-provider}
keyspace = ${menu.cassandra.keyspace}
}
lagom.circuit-breaker {
default {
# Enable/Disable circuit breaker.
enabled = on
# Number of failures before opening the circuit.
max-failures = 10
# Duration of time in open state after which to attempt to close
# the circuit, by first entering the half-open state.
reset-timeout = 30s
# Duration of time after which to consider a call a failure.
call-timeout = 30s
}
}
lagom.persistence.read-side {
# how long should we wait when retrieving the last known offset
offset-timeout = 5s
# Exponential backoff for failures in ReadSideProcessor
failure-exponential-backoff {
# minimum (initial) duration until processor is started again
# after failure
min = 3s
# the exponential back-off is capped to this duration
max = 30s
# additional random delay is based on this factor
random-factor = 0.2
}
# The amount of time that a node should wait for the global prepare callback to execute
global-prepare-timeout = 30s
# Specifies that the read side processors should run on cluster nodes with a specific role.
# If the role is not specified (or empty) all nodes in the cluster are used.
run-on-role = ""
# The Akka dispatcher to use for read-side actors and tasks.
use-dispatcher = lagom.persistence.dispatcher
}
akka {
actor {
provider = cluster
}
cluster {
shutdown-after-unsuccessful-join-seed-nodes = 40s
}
discovery {
method = kubernetes-api
kubernetes-api {
pod-label-selector="app=menu"
}
}
io {
dns {
resolver = async-dns
async-dns {
provider-object = com.lightbend.rp.asyncdns.AsyncDnsProvider
resolve-srv = true
resolv-conf = on
}
}
}
management {
http {
hostname = ${?POD_IP}
port = 10002
bind-hostname = 0.0.0.0
bind-port = 10002
}
cluster.bootstrap {
contact-point-discovery {
required-contact-point-nr=1
}
}
}
remote.netty.tcp {
hostname = ${?POD_IP}
port = 10001
bind-hostname = 0.0.0.0
bind-port = 10001
}
}
lagom.cluster.exit-jvm-when-system-terminated = on
play.modules.enabled += com.lightbend.rp.servicediscovery.lagom.javadsl.ServiceLocatorModule
play.server.http {
address = 0.0.0.0
port = 9000
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment