-
Notifications
You must be signed in to change notification settings - Fork 214
/
ditto-mongo.conf
78 lines (65 loc) · 2.9 KB
/
ditto-mongo.conf
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
# the MongoDB settings configured here are applied to the Ditto services:
# * things-search
# and following Ditto functionalities:
# * persistence streaming actors: org.eclipse.ditto.internal.utils.persistence.mongo.AbstractPersistenceStreamingActor
# * snapshot streaming actor: org.eclipse.ditto.internal.utils.persistence.mongo.SnapshotStreamingActor
# * persistence operations actors: org.eclipse.ditto.internal.utils.persistence.operations.AbstractPersistenceOperationsActor
# * mongo read journal: org.eclipse.ditto.internal.utils.persistence.mongo.streaming.MongoReadJournal
# * mongo health checks: org.eclipse.ditto.internal.utils.persistence.mongo.MongoHealthChecker
#
# these settings are however NOT APPLIED to the following Ditto services:
# * things (persistence via akka-persistence)
# * policies (persistence via akka-persistence)
# * connectivity (persistence via akka-persistence)
ditto.mongodb {
hostname = "localhost"
hostname = ${?MONGO_DB_HOSTNAME}
port = 27017
port = ${?MONGO_DB_PORT}
authentication = ${?MONGO_DB_AUTHENTICATION}
database = ditto
database = ${?MONGO_DB_DATABASE}
# the above keys are not read from Ditto config code, but are only used in the default "uri" here:
uri = "mongodb://"${?ditto.mongodb.authentication}${ditto.mongodb.hostname}":"${ditto.mongodb.port}"/"${ditto.mongodb.database}
uri = ${?MONGO_DB_URI}
maxQueryTime = 60s
maxQueryTime = ${?MONGO_DB_QUERY_TIMEOUT}
# whether or not to configure compatibility mode for "DocumentDB" (as replacement for MongoDB)
documentDb-compatibility-mode = false
documentDb-compatibility-mode = ${?MONGO_DB_DOCUMENTDB_COMPATIBILITY_MODE}
options {
ssl = false
ssl = ${?MONGO_DB_SSL_ENABLED}
# read preference is one of: primary, primaryPreferred, secondary, secondaryPreferred, nearest
readPreference = primary
readPreference = ${?MONGO_DB_READ_PREFERENCE}
# read concern is one of: default, local, majority, linearizable, snapshot, available
readConcern = local
readConcern = ${?MONGO_DB_READ_CONCERN}
# write concern is one of: unacknowledged, acknowledged, majority, journaled, w1, w2, w3
writeConcern = acknowledged
writeConcern = ${?MONGO_DB_WRITE_CONCERN}
retryWrites = true
retryWrites = ${?MONGO_DB_RETRY_WRITES}
// all options in the "extra-options" are simply added to the MongoDB URI
// that way any available URI option may be added, even if not explicitly specified in Ditto's mongo config
extra-uri-options {
// e.g.:
// ssl=true
// sslInvalidHostNameAllowed=true
// minPoolSize=0
// maxPoolSize=100
// ...
}
}
pool {
minSize = 0
minSize = ${?MONGO_DB_CONNECTION_MIN_POOL_SIZE}
maxSize = 100
maxSize = ${?MONGO_DB_CONNECTION_POOL_SIZE}
maxIdleTime = -1s
maxIdleTime = ${?MONGO_DB_CONNECTION_POOL_IDLE_TIME}
maxWaitTime = 30s
maxWaitTime = ${?MONGO_DB_CONNECTION_POOL_WAIT_TIME}
}
}