上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 41 下一页

2021年8月28日

跟着seata学Netty之怎么写同步发送逻辑

摘要: 看了seata的TCC部分源码,看到TC调用每个分支事务的提交逻辑,看到了如何利用netty进行同步调用的写法,感觉挺好 AbstractNettyRemoting # sendSync protected Object sendSync(Channel channel, RpcMessage rp 阅读全文

posted @ 2021-08-28 18:30 MaXianZhe 阅读(325) 评论(0) 推荐(0) 编辑

数组转list的坑

摘要: 看两段代码 int[] myArray = {1, 2, 3}; List myList = Arrays.asList(myArray); Integer[] myArray = {1, 2, 3}; List myList = Arrays.asList(myArray); 这两段代码差别很大, 阅读全文

posted @ 2021-08-28 16:10 MaXianZhe 阅读(49) 评论(0) 推荐(0) 编辑

Rocketmq 总结 (二) -- 消息发送

摘要: 源码入口在DefaultMQProducerImpl.sendKernelImpl 第一步是选择要发送的messageQueue 这里又分为两步 1 获取该topic当时的发布信息,也就是该topic都落在哪些broker DefaultMQProducerImpl # tryToFindTopic 阅读全文

posted @ 2021-08-28 14:49 MaXianZhe 阅读(66) 评论(0) 推荐(0) 编辑

2021年8月20日

Seata 拦截器源码分析

摘要: public class GlobalTransactionalInterceptor implements ConfigurationChangeListener, MethodInterceptor 该拦截器实现了spring的接口 MethodInterceptor @Override pub 阅读全文

posted @ 2021-08-20 18:16 MaXianZhe 阅读(130) 评论(1) 推荐(0) 编辑

Seata AT模式全局锁源码分析

摘要: 源码版本为1.3.0 分支事务执行前,需要把分支注册到seata server 代码 AbstractCore # branchRegister @Override public Long branchRegister(BranchType branchType, String resourceId 阅读全文

posted @ 2021-08-20 16:54 MaXianZhe 阅读(538) 评论(0) 推荐(0) 编辑

2021年8月13日

Rocketmq 不同的topic要配不同的consumegroup

摘要: 使用Rocketmq一定要注意,如果项目中要订阅两个topic,一定要保证consumeGroup是两个不同的。 这是因为,Consumer会定期发送心跳,默认是30s一次。心跳会像全部broker发送,心跳包内容包括groupname,topicname1。然后broker端会缓存这个信息,以gr 阅读全文

posted @ 2021-08-13 16:24 MaXianZhe 阅读(2197) 评论(0) 推荐(0) 编辑

2021年8月12日

SpringBoot之使用外部的启动类

摘要: 公司内部统一包装了启动类,TradeBootStrap @EnableLionConfig @SpringBootApplication( excludeName = {"${exclude.auto-configuration.name}"}, scanBasePackages = {"${sca 阅读全文

posted @ 2021-08-12 09:46 MaXianZhe 阅读(248) 评论(0) 推荐(0) 编辑

2021年8月11日

RocketMq总结(六) -- 顺序消息

摘要: 一 消息拉取 顺序消费和非顺序消费的第一个区别是,拉取消息的时候和非顺序消息有区别 if (processQueue.isLocked()) { if (!pullRequest.isLockedFirst()) { final long offset = this.rebalanceImpl.co 阅读全文

posted @ 2021-08-11 20:23 MaXianZhe 阅读(165) 评论(0) 推荐(0) 编辑

RocketMq总结(五) -- 消息队列负载均衡和再分配

摘要: RocketMQ 消息队列重新分布 由RebalanceService 来实现的 。一个 MQClientInstance持有一个RebalanceService现实,并随 MQClientlnstance 的启动而启动 public class MQClientInstance { private 阅读全文

posted @ 2021-08-11 11:09 MaXianZhe 阅读(674) 评论(0) 推荐(0) 编辑

2021年8月10日

RocketMq总结(三) -- 消费者启动 MQClientInstance

摘要: 一 消费者成员变量 public class DefaultMQPushConsumerImpl implements MQConsumerInner { /** * Delay some time when exception occur */ private long pullTimeDelay 阅读全文

posted @ 2021-08-10 11:10 MaXianZhe 阅读(270) 评论(0) 推荐(0) 编辑

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 41 下一页

导航