springCloud分布式事务实战分布式事务处理器的下载,编译和运行

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了springCloud分布式事务实战分布式事务处理器的下载,编译和运行相关的知识,希望对你有一定的参考价值。

(1)下载分布式事务处理器工程源码
https://github.com/codingapi/tx-lcn/
技术分享图片
(2)导入eclipse
技术分享图片
(3)修改配置文件
填写分布式事务服务器地址,redis地址 ,注册中心地址
#服务端口
server.port=7000
#tx-manager不得修改
spring.application.name=tx-manager

spring.mvc.static-path-pattern=/**
spring.resources.static-locations=classpath:/static/
#eureka 地址
eureka.client.service-url.defaultZone=http://127.0.0.1:8001/eureka/
eureka.instance.prefer-ip-address=true
#业务模块与TxManager之间通讯的最大等待时间(单位:秒)
#通讯时间是指:发起方与响应方之间完成一次的通讯时间。
#该字段代表的是Tx-Client模块与TxManager模块之间的最大通讯时间,超过该时间未响应本次请求失败。
tm.transaction.netty.delaytime = 5

#业务模块与TxManager之间通讯的心跳时间(单位:秒)
tm.transaction.netty.hearttime = 15

#存储到redis下的数据最大保存时间(单位:秒)
#该字段仅代表的事务模块数据的最大保存时间,补偿数据会永久保存。
tm.redis.savemaxtime=30

#socket server Socket对外服务端口
#TxManager的LCN协议的端口
tm.socket.port=9999
#最大socket连接数
#TxManager最大允许的建立连接数量
tm.socket.maxconnection=100
tm.compensate.auto=false
tm.compensate.notifyUrl=http://ip:port/path

tm.compensate.tryTime=30
tm.compensate.maxWaitTime=5000
logging.level.com.codingapi=debug

(3)运行事务管理
启动事务管理器 TxManagerApplication.java
启动redis
启动注册中心
测试是注册中心注册成功
技术分享图片

以上是关于springCloud分布式事务实战分布式事务处理器的下载,编译和运行的主要内容,如果未能解决你的问题,请参考以下文章

springCloud分布式事务实战案例需求及实现步骤

springCloud分布式事务实战案例需求及实现步骤

SpringCloud系列——分布式事务seata整合实战

springCloud分布式事务实战改造ThemeMicroService 支持分布式事务

springCloud分布式事务实战改造合服务BlockMicroService支持分布式事务

springCloud分布式事务实战分布式事务综合大测试(全,共10篇)