keer.akka-persistence-pg_2.11.0.14.0.source-code.reference.conf Maven / Gradle / Ivy
The newest version!
pg-journal {
# class name of the jdbc journal plugin
class = "akka.persistence.pg.journal.PgAsyncWriteJournal"
plugin-dispatcher = "akka.persistence.pg.default-dispatcher"
}
pg-snapshot {
# class name of the jdbc snapshot store
class = "akka.persistence.pg.snapshot.PgAsyncSnapshotStore"
plugin-dispatcher = "akka.persistence.pg.default-dispatcher"
}
akka.persistence.pg {
journal.query {
class = "akka.persistence.pg.query.PostgresReadJournalProvider"
refresh-interval = 3s
max-buffer-size = 100
write-plugin = "pg-journal"
}
default-dispatcher {
# Dispatcher is the name of the event-based dispatcher
type = Dispatcher
# What kind of ExecutionService to use
executor = "thread-pool-executor"
# Configuration for the thread pool
thread-pool-executor {
core-pool-size-min = 4
core-pool-size-max = 8
}
shutdown-timeout = 10
throughput = 1
}
}
pg-persistence {
db {
password = "akkapg"
user = "akkapg"
url = "jdbc:postgresql://localhost:5432/akka"
jndiName = "" # if you already have a DB configured somewhere else, you can share it through JNDI,
# when doing so, user, password and url are not needed but maxConnections is required
maxConnections = 4 # maximum number of JDBC connections of the underlying pool
numThreads = 4
queueSize = 1000
connectionTimeout = 1000
validationTimeout = 1000
connectionPool = "HikariCP" # set to "disabled" to disable connection pooling, useful for tests
dataSourceClass = "org.postgresql.ds.PGSimpleDataSource"
#for other optional HikarCP related properties, check the JdbcBackend.forConfig scaladoc
properties = {
prepareThreshold = 1 #enable prepared statement caching on the server side, required because HikariCP does not do prepared statement caching
}
}
pgjson = "json" //allowed values are 'json' and 'jsonb'
schemaName = ""
journalTableName = "journal"
snapshotTableName = "snapshot"
snapshotEncoder: "" #default is no json snapshot encoding, binary serialization
ignoreSnapshotDecodingFailure: false
writestrategy = "akka.persistence.pg.journal.TableLockingWriteStrategy"
eventstore {
encoder: "" #default is no json event encoding, binary serialization
tagger: "default" #default event tagger or 'none' for no tagging or a full classname of a custom EventTagger implementation
useView: false # if false events will be read directly from the journal, if true you need to create a view
#on the journal table that only shows the events
idColumnName: "id"
eventViewSchema: ""
eventViewName: "events"
}
}