config.txt 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. #For details about configuration items, see https://seata.io/zh-cn/docs/user/configurations.html
  2. #Transport configuration, for client and server
  3. transport.type=TCP
  4. transport.server=NIO
  5. transport.heartbeat=true
  6. transport.enableTmClientBatchSendRequest=false
  7. transport.enableRmClientBatchSendRequest=true
  8. transport.enableTcServerBatchSendResponse=false
  9. transport.rpcRmRequestTimeout=30000
  10. transport.rpcTmRequestTimeout=30000
  11. transport.rpcTcRequestTimeout=30000
  12. transport.threadFactory.bossThreadPrefix=NettyBoss
  13. transport.threadFactory.workerThreadPrefix=NettyServerNIOWorker
  14. transport.threadFactory.serverExecutorThreadPrefix=NettyServerBizHandler
  15. transport.threadFactory.shareBossWorker=false
  16. transport.threadFactory.clientSelectorThreadPrefix=NettyClientSelector
  17. transport.threadFactory.clientSelectorThreadSize=1
  18. transport.threadFactory.clientWorkerThreadPrefix=NettyClientWorkerThread
  19. transport.threadFactory.bossThreadSize=1
  20. transport.threadFactory.workerThreadSize=default
  21. transport.shutdown.wait=3
  22. transport.serialization=seata
  23. transport.compressor=none
  24. #Transaction routing rules configuration, only for the client
  25. # 此处的mygroup名字可以自定义,只修改这个值即可
  26. # 分布式事务涉及到的服务:注册名字为:service.vgroup_mapping.{namespace}-seata-service-group=default
  27. #service.vgroupMapping.default_tx_group=default
  28. service.vgroup_mapping.example-seata-service-group=default
  29. service.vgroup_mapping.file-seata-service-group=default
  30. service.vgroup_mapping.system-seata-service-group=default
  31. service.vgroup_mapping.message-seata-service-group=default
  32. #service.vgroup_mapping.example-seata-service-group=default
  33. #service.vgroup_mapping.example-seata-service-group=default
  34. # 分布式事务指定的tx群组
  35. #service.vgroupMapping.calvin_test_tx_group=default
  36. #If you use a registry, you can ignore it
  37. #service.default.grouplist=127.0.0.1:8091
  38. service.default.grouplist=10.10.10.230:18091
  39. service.enableDegrade=false
  40. service.disableGlobalTransaction=false
  41. #Transaction rule configuration, only for the client
  42. client.rm.asyncCommitBufferLimit=10000
  43. client.rm.lock.retryInterval=10
  44. client.rm.lock.retryTimes=30
  45. client.rm.lock.retryPolicyBranchRollbackOnConflict=true
  46. client.rm.reportRetryCount=5
  47. client.rm.tableMetaCheckEnable=true
  48. client.rm.tableMetaCheckerInterval=60000
  49. client.rm.sqlParserType=druid
  50. client.rm.reportSuccessEnable=false
  51. client.rm.sagaBranchRegisterEnable=false
  52. client.rm.sagaJsonParser=fastjson
  53. client.rm.tccActionInterceptorOrder=-2147482648
  54. client.tm.commitRetryCount=5
  55. client.tm.rollbackRetryCount=5
  56. client.tm.defaultGlobalTransactionTimeout=60000
  57. client.tm.degradeCheck=false
  58. client.tm.degradeCheckAllowTimes=10
  59. client.tm.degradeCheckPeriod=2000
  60. client.tm.interceptorOrder=-2147482648
  61. client.undo.dataValidation=true
  62. client.undo.logSerialization=jackson
  63. client.undo.onlyCareUpdateColumns=true
  64. server.undo.logSaveDays=7
  65. server.undo.logDeletePeriod=86400000
  66. client.undo.logTable=undo_log
  67. client.undo.compress.enable=true
  68. client.undo.compress.type=zip
  69. client.undo.compress.threshold=64k
  70. #For TCC transaction mode
  71. tcc.fence.logTableName=tcc_fence_log
  72. tcc.fence.cleanPeriod=1h
  73. #Log rule configuration, for client and server
  74. log.exceptionRate=100
  75. #Transaction storage configuration, only for the server. The file, db, and redis configuration values are optional.
  76. # 默认为file,一定要改为db,我们自己的服务启动会连接不到seata
  77. store.mode=db
  78. store.lock.mode=db
  79. store.session.mode=db
  80. #Used for password encryption
  81. #These configurations are required if the `store mode` is `db`. If `store.mode,store.lock.mode,store.session.mode` are not equal to `db`, you can remove the configuration block.
  82. # 修改mysql的配置
  83. store.db.datasource=druid
  84. store.db.dbType=mysql
  85. store.db.driverClassName=com.mysql.cj.jdbc.Driver
  86. # 指定seata的数据库,下面会提
  87. #store.db.url=jdbc:mysql://47.108.162.14:3306/seata?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
  88. #store.db.user=root
  89. #store.db.password=Yy123...
  90. store.db.url=jdbc:mysql://10.10.10.230:3306/seata?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=GMT%2B8
  91. store.db.user=sckw_dev
  92. store.db.password=Yy123...
  93. store.db.minConn=5
  94. store.db.maxConn=30
  95. store.db.globalTable=global_table
  96. store.db.branchTable=branch_table
  97. store.db.distributedLockTable=distributed_lock
  98. store.db.queryLimit=100
  99. store.db.lockTable=lock_table
  100. store.db.maxWait=5000
  101. #Transaction rule configuration, only for the server
  102. server.recovery.committingRetryPeriod=1000
  103. server.recovery.asynCommittingRetryPeriod=1000
  104. server.recovery.rollbackingRetryPeriod=1000
  105. server.recovery.timeoutRetryPeriod=1000
  106. server.maxCommitRetryTimeout=-1
  107. server.maxRollbackRetryTimeout=-1
  108. server.rollbackRetryTimeoutUnlockEnable=false
  109. server.distributedLockExpireTime=10000
  110. server.xaerNotaRetryTimeout=60000
  111. server.session.branchAsyncQueueSize=5000
  112. server.session.enableBranchAsyncRemove=false
  113. server.enableParallelRequestHandle=false
  114. #Metrics configuration, only for the server
  115. metrics.enabled=false
  116. metrics.registryType=compact
  117. metrics.exporterList=prometheus
  118. metrics.exporterPrometheusPort=9898