RocketMQ这个问题看下呢?
通过admin tool工具测试的:mqadmin consumeMessage -n 10.92.0.1:9876 -t test -g test-group -c 2
For more information, please visit the url, https://rocketmq.apache.org/docs/bestPractice/06FAQ
at org.apache.rocketmq.client.impl.MQAdminImpl.minOffset(MQAdminImpl.java:244)
at org.apache.rocketmq.client.impl.consumer.DefaultMQPullConsumerImpl.minOffset(DefaultMQPullConsumerImpl.java:175)
at org.apache.rocketmq.client.consumer.DefaultMQPullConsumer.minOffset(DefaultMQPullConsumer.java:166)
at org.apache.rocketmq.tools.command.message.ConsumeMessageCommand.executeDefault(ConsumeMessageCommand.java:257)
at org.apache.rocketmq.tools.command.message.ConsumeMessageCommand.execute(ConsumeMessageCommand.java:195)
at org.apache.rocketmq.tools.command.MQAdminStartup.main0(MQAdminStartup.java:164)
at org.apache.rocketmq.tools.command.MQAdminStartup.main(MQAdminStartup.java:114)
有master的时候,通过admin tool工具,发送和消费正常
没有master的时候,消费报错,找不到broker-1
这是slave的配置,启动就不发了,跟master那个启动基本是一样的,看slave日志,又能看到它跟master交互
2024-07-26 10:38:01 INFO BrokerControllerScheduledThread1 - Update slave topic config from master, 10.91.0.84:10911
2024-07-26 10:38:01 INFO BrokerControllerScheduledThread1 - Update slave consumer offset from master, 10.91.0.84:10911
2024-07-26 10:38:01 INFO BrokerControllerScheduledThread1 - load /home/rocketmq/store/config/delayOffset.json OK
2024-07-26 10:38:01 INFO BrokerControllerScheduledThread1 - Update slave delay offset from master, 10.91.0.84:10911
2024-07-26 10:38:01 INFO BrokerControllerScheduledThread1 - Update slave Message Request Mode from master, 10.91.0.84:10911
工具不行,看堆栈工具里用了minOffset,这个时候只走了findBrokerAddressInPublish,会找能写入的队列
如果是你自己编写的consumer程序,在运行中应该是走findBrokerAddressInSubscribe,这个时候会去找slave,
此回答整理自钉群“群2-Apache RocketMQ 中国开发者钉钉群”
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
涵盖 RocketMQ、Kafka、RabbitMQ、MQTT、轻量消息队列(原MNS) 的消息队列产品体系,全系产品 Serverless 化。RocketMQ 一站式学习:https://rocketmq.io/