ITPub博客

首页 > IT职业 > IT生活 > SpringCloud Alibaba Seata处理分布式事务

SpringCloud Alibaba Seata处理分布式事务

IT生活 作者:专注的阿熊 时间:2021-11-12 17:23:29 0 删除 编辑

transport {

   # tcp udt unix-domain-socket

   type = "TCP"

   #NIO NATIVE

   server = "NIO"

   #enable heartbeat

   heartbeat = true

   #thread factory for netty

   thread-factory {

     boss-thread-prefix = "NettyBoss"

     worker-thread-prefix = "NettyServerNIOWorker"

     server-executor-thread-prefix = "NettyServerBizHandler"

     share-boss-worker = false

     client-selector-thread-prefix = "NettyClientSelector"

     client-selector-thread-size = 1

     client-worker-thread-prefix = "NettyClientWorkerThread"

     # netty boss thread size,will not be used for UDT

     boss-thread-size = 1

     #auto default pin or 8

     worker-thread-size = 8

   }

   shutdown {

     # when destroy server, wait seconds

     wait = 3

   }

   serialization = "seata"

   compressor = "none"

}

service {

   vgroup_mapping.fsp_tx_group = "default"

   default.grouplist = "127.0.0.1:8091"

   enableDegrade = false

   disable = false

   max.commit.retry.timeout = "-1"

   max.rollback.retry.timeout = "-1"

   disableGlobalTransaction = false

}

client {

   async.commit.buffer.limit = 10000

   lock {

     retry.internal = 10

     retry.times = 30

   }

   report.retry.count = 5

   tm.commit.retry.count = 1

   tm.rollback.retry.count = 1

}

## transaction log store

store {

   ## store mode: file db

   mode = "db"

   ## file store

   file {

     dir = "sessionStore"

     # branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions

     max-branch-session-size = 16384

     # globe session size , if exceeded throws exceptions

     max-global-session-size = 512

     # file buffer size , if exceeded allocate new buffer

     file-write-buffer-cache-size = 16384

     # when recover batch read size

     session.reload.read_size = 100

     # async, sync

     flush-disk-mode = async

   }

   ## database store

   db {

     ## the implement of javax.sql.DataSource, such as DruidDataSource(druid)/BasicDataSource(dbcp) etc.

     datasource = "dbcp"

     ## mysql/oracle/h2/oceanbase etc.

     db-type = "mysql"

     driver-class-name = "com.mysql.jdbc.Driver"

     url = "jdbc:mysql://127.0.0.1:3306/seata"

     user = "root"

     password = "123456"

     min-conn = 1

     max-conn = 3

     global.table = "global_table"

     branch.table = "branch_table"

     lock-table = "lock_table"

     query-limit = 100

   }

}

lock {

   ## the lock store mode: local remote

   mode = "remote"

   local {

     ## store locks in user's database

   }

   remote {

     ## store locks in the seata's server

   }

}

recovery {

   #schedule committing retry period in milliseconds

   committing-retry-period = 1000

   #schedule asyn 外汇跟单gendan5.comcommitting retry period in milliseconds

   asyn-committing-retry-period = 1000

   #schedule rollbacking retry period in milliseconds

   rollbacking-retry-period = 1000

   #schedule timeout retry period in milliseconds

   timeout-retry-period = 1000

}

transaction {

   undo.data.validation = true

   undo.log.serialization = "jackson"

   undo.log.save.days = 7

   #schedule delete expired undo_log in milliseconds

   undo.log.delete.period = 86400000

   undo.log.table = "undo_log"

}

## metrics settings

metrics {

   enabled = false

   registry-type = "compact"

   # multi exporters use comma divided

   exporter-list = "prometheus"

   exporter-prometheus-port = 9898

}

support {

   ## spring

   spring {

     # auto proxy the DataSource bean

     datasource.autoproxy = false

   }

}


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/69946337/viewspace-2841995/,如需转载,请注明出处,否则将追究法律责任。

下一篇: python实现贪吃蛇
请登录后发表评论 登录
全部评论

注册时间:2019-08-23

  • 博文量
    248
  • 访问量
    137511