SEND_MSG_FAILED

exception information

Send [xxx] times, still failed, cost [xxx]ms, Topic: xxx, BrokersSent ...

reason 1)The Producer message sending is abnormal. A total of 3 times are sent in SYNC mode, and 1 time is sent in ASYNC and ONEWAY.

solution 1)Whether the timeout parameter of the Producer sending message is too small.

2)Ensure that the Broker is normal.

3)Ensure that the connection between the Producer and Broker is normal.

FAQs | RocketMQ

org.apache.rocketmq.client.exception.MQClientException: Send | 无疑 官方网站 | nacos、dubbo 、arthas报错处理 | 阿里开源 | 无疑

https://blog.csdn.net/2301_79140115/article/details/148502972?sharetype=blogdetail&sharerId=148502972&sharerefer=PC&sharesource=2301_79140115&spm=1011.2480.3001.8118

发送和接收消息

工具验证(容器内)

Apache RocketMQ 安装、测试、报错解决_error: could not find or load main class org.apach-CSDN博客

启动生产者
 > sh bin/tools.sh org.apache.rocketmq.example.quickstart.Producer
 SendResult [sendStatus=SEND_OK, msgId= ...
 
 
启动消费者
 > sh bin/tools.sh org.apache.rocketmq.example.quickstart.Consumer
 ConsumeMessageThread_%d Receive New Messages: [MessageExt...

Broker容器内部网络环境配置正确

Java SDK 错误

1. 设置很大超时时间 -> 报错仍然存在(排除原因)

2. Broker 正常(通过内部工具验证)

3. Producer 和 Broker 连接问题

Caused by: org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to xxxxxxxx:10911 failed

(1)确认Broker已成功注册,且地址为xxxxxxxx:10911 为宿主机ip

        并未显示容器内IP(如172.x.x.x),说明brokerIP1配置未生效

(2)端口也成功映射主机

03f3e5feccfe   foxiswho/rocketmq:broker-4.5.1   
0.0.0.0:10909->10909/tcp, [::]:10909->10909/tcp,
0.0.0.0:10911->10911/tcp, [::]:10911->10911/tcp     rmqbroker

(3)确定是版本兼容问题 4.5.1 -> 4.9.6 demo 成功收发

Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐