huyu-tom

Results 11 comments of huyu-tom

我粗略看了一下他的源码,因为他的逻辑是 先通过threadlocal中拿到连接,如果没有拿到要创建连接,并且放在threadlocal当中,并且存储的值是一个list,list里面包含的就是连接了吧,如果里面list全部借完,并且达到了设置的最大值(在threadlocal),这个时候就会走公共池(加锁), 由于以前是用线程池(线程相对固定),所以大部分逻辑直接走threadlcoal里面拿值吧(并且也能拿到值,因为线程还存活着,在池里面),但是用了虚拟线程的话,官方说不建议池化虚拟线程,所以每次threadlocal都是空,每次都要创建,然后设置进去,然后虚拟线程运行逻辑完毕,销毁,相当于threadlocal存储的连接也销毁了吧,(所以创建,销毁),没有达到threadlocal的复用性,或者走了加锁的公共池(导致虚拟线程性能不如以前的普通线程池),个人愚见,有错误请见谅

并且大量的threadlocal,在thread这个类里面存储了一个map,key是threadlocal, value就是设置的值,会增加gc压力,每个虚拟线程都有一个类似的map,并且生命周期很短(没有池化),反而没有用。反而增加了gc的压力

I took a rough look at his source code, because his logic is to get the connection through threadlocal first. If not, create a connection and put it in threadlocal,...

And a large number of ThreadLocals store a map in the thread class. The key is threadlocal and the value is the set value. This will increase the gc pressure....

> > > I took a rough look at his source code, because his logic is to get the connection through threadlocal first. If not, create a connection and put...

> > > > I took a rough look at his source code, because his logic is to get the connection through threadlocal first. If not, create a connection and...

如果在spring-boot:process-aot期间出现问题,建议在springboot-process-aot加上 -Dseata.enabled=false, 就不会出现以上问题

fatjson2 2.57 版本 和 graalvm21版本 , deserialize boolean 字段还是错误的, 导致rocketmq反序列化失败, 自己也简单设置了一个boolean字段的类,反序列化失败,堆栈信息是: ``` org.springframework.messaging.MessagingException: syntax error : 102 at org.apache.rocketmq.spring.core.RocketMQTemplate.sendOneWay(RocketMQTemplate.java:1083) at org.apache.rocketmq.spring.core.RocketMQTemplate.sendOneWay(RocketMQTemplate.java:1095) at com.huyu.testgraalvmlogmaven.controller.TestController.test(TestController.java:43) at [email protected]/java.lang.reflect.Method.invoke(Method.java:580) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:258) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:191) at...

> 你好,这个问题你有解决吗 fastjson和fastjson2引起的反序列化异常, 主要是fastjson和fastjson2在native-image的bug,https://github.com/alibaba/fastjson2/issues/3108 这个错误的导致的

> 发送不包含布尔值的消息也会出现相同的问题 > > [2025-07-29 16:22:54.520] [ERROR] [95c702d36f964bc7bdd697b19959144a] [http-nio-18899-exec-1] o.a.r.s.c.RocketMQTemplate:698 - syncSend failed. destination:UZ-UA-SLAB, message:GenericMessage [payload=byte[23], headers={contentType=text/plain;charset=UTF-8, id=8a15004f-717f-383e-668b-d237d07dddfc, timestamp=1753777374133}], detail exception info: java.lang.IllegalStateException: org.apache.rocketmq.remoting.exception.RemotingSendRequestException: send request to failed at org.apache.rocketmq.client.impl.factory.MQClientInstance.updateTopicRouteInfoFromNameServer(MQClientInstance.java:859)...