-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapplication.conf
More file actions
170 lines (146 loc) · 4.75 KB
/
Copy pathapplication.conf
File metadata and controls
170 lines (146 loc) · 4.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
play {
akka.actor-system = "orders-service"
modules.enabled += ru.shadewallcorp.itdepart.sampleService.Module
# See https://github.com/lagom/lagom-recipes/tree/master/mixed-persistence/mixed-persistence-java-sbt
modules.disabled += com.lightbend.lagom.javadsl.persistence.jdbc.JdbcPersistenceModule
# Hack for logging. The module of the service registers own implementations.
modules.disabled += play.api.libs.ws.ahc.AhcWSModule
http.filters = ru.shadewallcorp.itdepart.sampleService.Filters
}
# Logging outgoing HTTP requests
configured-ahc-ws-client {
request-logging-enabled = false
}
# To avoid implicit changes of the state store mode in future Lagom versions
akka.cluster.sharding.state-store-mode = ddata
lagom.serialization.json {
jackson-modules += "ru.shadewallcorp.itdepart.sampleService.JacksonCustomSetupModule"
}
# Cassandra
# write-side configuration.
orders-service.cassandra.keyspace = orders_service
# https://www.lagomframework.com/documentation/1.5.x/java/ProductionOverview.html#Using-static-Cassandra-contact-points
cassandra.default {
## list the contact points here
contact-points = [${?CASSANDRA_URL}]
## override Lagom’s ServiceLocator-based ConfigSessionProvider
session-provider = akka.persistence.cassandra.ConfigSessionProvider
}
cassandra-journal {
keyspace = ${orders-service.cassandra.keyspace}
contact-points = ${cassandra.default.contact-points}
session-provider = ${cassandra.default.session-provider}
}
cassandra-snapshot-store {
keyspace = ${orders-service.cassandra.keyspace}
contact-points = ${cassandra.default.contact-points}
session-provider = ${cassandra.default.session-provider}
}
# Cassandra read-sides are unused in this example, but the offsetstore is still automatically created by default.
# It is possible to mix both Cassandra and JDBC/JPA read-side processors in the same service this way.
lagom.persistence.read-side.cassandra {
keyspace = ${orders-service.cassandra.keyspace}
contact-points = ${cassandra.default.contact-points}
session-provider = ${cassandra.default.session-provider}
}
play.evolutions.db.default.autoApply = true
play.evolutions.db.default.useLocks = true
# JPA
# read-side configuration.
lagom.persistence.jdbc.create-tables.auto = false
db.default {
driver = oracle.jdbc.driver.OracleDriver
url = ${?DB_URL}
jndiName = DefaultDS
username = "ORDERS_SERVICE"
password = "ToDo_Password"
hikaricp {
poolName: ${taymyr.lagom.metrics.prefix}".database"
connectionTimeout = 1s
connectionTestQuery = "SELECT 1 FROM DUAL"
}
}
lagom.persistence.jpa {
# This must match the name in persistence.xml
persistence-unit = "defaultPersistenceUnit"
}
jdbc-defaults.slick.profile = "slick.jdbc.OracleProfile$"
# Finally, ensure that Cassandra is used for the journal and snapshot-store
# Lagom's Cassandra and JDBC persistence modules both define these properties,
# so the order they are applied is non-deterministic.
akka.persistence {
journal {
plugin = cassandra-journal
}
snapshot-store {
plugin = cassandra-snapshot-store
}
}
# Kafka
# Kafka
# Service name is empty by default
lagom.broker.kafka.service-name = ""
lagom.broker.kafka.brokers = ${?KAFKA_BROKERS}
# ES
akka {
discovery {
method = aggregate
aggregate {
discovery-methods = ["config", "akka-dns"]
}
config {
services {
elastic-search {
endpoints = [
{
host = ${ELASTIC_SEARCH_HOST}
port = ${ELASTIC_SEARCH_PORT}
}
]
}
elastic-document {
endpoints = [
{
host = ${ELASTIC_SEARCH_HOST}
port = ${ELASTIC_SEARCH_PORT}
}
]
}
}
}
}
}
# Split Brain Resolver
akka.cluster.downing-provider-class = "tanukki.akka.cluster.autodown.MajorityLeaderAutoDowning"
custom-downing {
stable-after = 7s
majority-leader-auto-downing {
majority-member-role = ""
down-if-in-minority = true
shutdown-actor-system-on-resolution = true
}
}
# The service-name needs to match the app label applied to your pods in the deployment spec.
akka.management {
cluster.bootstrap {
contact-point-discovery {
discovery-method = kubernetes-api
service-name = "sampleService"
required-contact-point-nr = ${?REQUIRED_CONTACT_POINT_NR}
}
}
}
taymyr.lagom.metrics {
prefix = "sampleService"
enableJVM = true
enableHikari = true
enableCassandra = true
}
# Enable the serializer provided in Akka 2.5.8+ for akka.Done and other internal
# messages to avoid the use of Java serialization.
akka.actor.serialization-bindings {
"akka.Done" = akka-misc
"akka.actor.Address" = akka-misc
"akka.remote.UniqueAddress" = akka-misc
}
akka.actor.allow-java-serialization = off