RocketMQ消息发送broker busy、超时异常原因分析与解决方案(持续更新)

本文介绍了在使用RocketMQ时遇到的broker busy和消息发送超时异常,分析了可能的原因,包括发送线程池大小不足、消息堆积以及频繁GC导致的内存不足,并给出了相应的解决方案,如调整broker配置、增大超时时间等。
摘要由CSDN通过智能技术生成

背景

新手刚接触rocketmq,简单写了个producer发送接口,对producer的消息发送接口压测。压测过程中偶尔会出现几次broker busy以及两种超时异常:
1、org.apache.rocketmq.remoting.exception.RemotingTooMuchRequestException: sendDefaultImpl call timeout
2、org.apache.rocketmq.client.exception.MQClientException: Send [3] times, still failed, cost [10001]ms, Topic: testTopic, BrokersSent: [broker-a, broker-b, broker-a]
Caused by: org.apache.rocketmq.remoting.exception.RemotingTimeoutException: wait response on the channel <x.x.x.x:10011> timeout, 0(ms)
我这里报错的端口是我配置的broker端口10011,如果这里报错的是10009,或者是配置端口-2的话,说明是VIP端口,可以先去producer代码中关闭VIP端口。

记录下原因及解决。

关于broker busy解决参考了大佬的博客:https://blog.csdn.net/prestigeding/article/details/92800672
https://blog.csdn.net/hqwang4/article/details/90444299?tdsourcetag=s_pctim_aiomsg

原因
感觉broker busy以及RemotingTooMuchRequestException两个问题的原因差不多:
1

  • 4
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值