RabbitMQ异常,handleDelivery方法异常

bash 复制代码
2025-10-20 17:16:36.617 [pool-12-thread-11] ERROR o.s.a.rabbit.connection.CachingConnectionFactory - Shutdown Signal: clean channel shutdown; protocol method: #method<channel.close>(reply-code=200, reply-text=Closed due to exception from Consumer (amq.ctag-ja4pIuPdegz5H6D0lsEotQ) method handleDelivery for channel AMQChannel(amqp://xxxx:5672/,5), class-id=0, method-id=0)
2025-10-20 17:16:37.621 [pool-12-thread-18] ERROR com.rabbitmq.client.impl.ForgivingExceptionHandler - Consumer io.opentelemetry.javaagent.instrumentation.rabbitmq.TracedDelegatingConsumer@19b690ad (amq.ctag-e35fwqYed-Z1IYYYFrvBPQ) method handleDelivery for channel AMQChannel(amqp://xxxx:5672/,5) threw an exception for channel AMQChannel(amqp://xxxx:5672/,5)
java.lang.StringIndexOutOfBoundsException: String index out of range: 88
        at java.lang.String.substring(String.java:1963)
        at io.opentelemetry.javaagent.shaded.io.opentelemetry.api.trace.propagation.W3CTraceContextPropagator.extractContextFromTrace

报错如上所示:

从怀疑MQ的原因,到消费者方法问题,查了个遍。

One thousand year later!

结果,原来是应用启动时带了一个opentelemetry-javaagent。把java -jar 后面内容的opentelemetry-javaagent删除即可。

相关推荐
i***66504 小时前
分布式推理框架 xDit
分布式
哈哈哈笑什么4 小时前
分布式事务实战:订单服务 + 库存服务(基于本地消息表组件)
分布式·后端·rabbitmq
哈哈哈笑什么4 小时前
完整分布式事务解决方案(本地消息表 + RabbitMQ)
分布式·后端·rabbitmq
LDG_AGI5 小时前
【推荐系统】深度学习训练框架(十):PyTorch Dataset—PyTorch数据基石
人工智能·pytorch·分布式·python·深度学习·机器学习
tanxiaomi5 小时前
Redisson分布式锁 和 乐观锁的使用场景
java·分布式·mysql·面试
熊文豪7 小时前
【前瞻创想】Kurator:站在巨人肩膀上的分布式云原生创新实践
分布式·云原生·kurator
问道飞鱼8 小时前
【分布式知识】Redis-Shake 容器云部署完整指南
redis·分布式·redis-shake
milanyangbo10 小时前
从硬盘I/O到网络传输:Kafka与RocketMQ读写模型及零拷贝技术深度对比
java·网络·分布式·架构·kafka·rocketmq
有梦想的攻城狮10 小时前
Rabbitmq在死信队列中的队头阻塞问题
分布式·rabbitmq·死信队列·延迟队列
Wang's Blog11 小时前
Elastic Stack梳理:深度解析Elasticsearch分布式查询机制与相关性算分优化实践
分布式·elasticsearch