Send [xxx] times, still failed, cost [xxx]ms, Topic: xxx, BrokersSent ...
单节点 `broker-a` 存在单点故障风险。建议部署 **多 Master 集群**(如 `broker-a`, `broker-b`),确保 Topic 分布在多个节点。- Topic `index12306_pay-service_topic` 未在 `broker-a` 上创建,或权限不足(需至少 `-w-` 写入权限)。- 检查 `broker-a` 的日志(如 `$ROCKETMQ_
·
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.
发送和接收消息
工具验证(容器内)
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 成功收发
更多推荐
所有评论(0)