erp-java/seata/server/config/file.conf

133 lines
3.1 KiB
Plaintext

transport {
type = "TCP"
server = "Netty"
heartbeat = true
serialization = "seata"
compressor = "none"
enableClientBatchSendRequest = true
threadFactory {
bossThreadPrefix = "NettyBoss"
workerThreadPrefix = "NettyServerNIOWorker"
bossThreadSize = 1
}
一把head {
head exchange = "LengthFieldBasedFrameDecoder"
head codec = "seata"
}
}
server {
recovery {
commitRetryCount = 5
rollbackRetryCount = 5
asyncCommitRetryCount = 5
undoLogRetentionDays = 7
undoLogDeletePeriod = 86400000
}
undoLog {
compress {
enable = true
type = "zip"
threshold = "64k"
}
}
checkpoint {
persist {
enable = true
maxRetry = 3
}
}
}
client {
rm {
reportSuccessEnable = false
reportRetryCount = 5
tableMetaCheckEnable = false
asynchCommitRetryCount = 5
lock {
retryInterval = 30
retryTimes = 100
retryPolicyBranchRollbackOnConflict = true
}
}
tm {
commitRetryCount = 5
rollbackRetryCount = 5
degradeCheck = false
degradeCheckPeriod = 2000
degradeCheckRPCTimeout = 3000
degradeMaxRPCTimeout = 5000
}
undo {
dataValidation = true
logSerialization = "jackson"
logTable = "undo_log"
}
}
## transaction rules, you can choose reggie/raft/kafka
log {
appName = "default"
role = "seata-server"
storeType = "db"
server = "127.0.0.1:9911"
seata = "/root/logs/seata/seata.log"
}
store {
mode = "db"
db {
driverType = "mysql"
dataSource {
url = "jdbc:mysql://127.0.0.1:3306/seata?useUnicode=true&characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&failOverReadOnly=false&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true"
user = "root"
password = "root123"
}
## if you want to use MySQL 8.0+, you must add MySQL_RSA_PUBLIC_KEY to datasource properties
globalTable = "global_table"
branchTable = "branch_table"
lockTable = "lock_table"
distributedLockTable = "distributed_lock_table"
queryLimit = 100
maxRetry = 3
minPoolSize = 1
maxPoolSize = 10
maxLifetime = 1800000
borrowConnectionTimeout = 30000
maintainConnectionThreadName = "DbMaintainService"
idleTimeout = 60000
failFast = false
XA {
name = "MySQL XA"
class = "io.seata.server.storage.db.lock.LockStoreForXA"
}
AT {
name = "MySQL AT"
class = "io.seata.server.storage.db.lock.LockStoreForDB"
dbType = "mysql"
additor {
driverType = "mysql"
url = "jdbc:mysql://127.0.0.1:3306/seata?useUnicode=true&characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&failOverReadOnly=false&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true"
user = "root"
password = "root123"
minPoolSize = 1
maxPoolSize = 10
maxLifetime = 1800000
borrowConnectionTimeout = 30000
idleTimeout = 60000
failFast = false
}
}
}
}
metrics {
enabled = true
exporterList = "prometheus"
port = 9898
registryType = "compact"
exporterPrometheusMetricsType = "default"
}