开发者社区 > 云原生 > 云消息队列 > 正文

RocketMQ这个问题看下呢?

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)
bb59a7301d7433d80ce18769825d9736.png
f643c7b2ee162111ef9dccb365fcfcad.png
有master的时候,通过admin tool工具,发送和消费正常
没有master的时候,消费报错,找不到broker-1
afffdbe6244f889b401bbe0c1c69d210.png
这是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

展开
收起
嘟嘟嘟嘟嘟嘟 2024-08-01 08:59:12 28 0
1 条回答
写回答
取消 提交回答
  • 工具不行,看堆栈工具里用了minOffset,这个时候只走了findBrokerAddressInPublish,会找能写入的队列
    1230f31bdcd381b47383098a76581ba0.png
    如果是你自己编写的consumer程序,在运行中应该是走findBrokerAddressInSubscribe,这个时候会去找slave,
    90493202e8d8fa2f8be521ec477d11d5.png

    此回答整理自钉群“群2-Apache RocketMQ 中国开发者钉钉群”

    2024-08-01 09:24:44
    赞同 5 展开评论 打赏

涵盖 RocketMQ、Kafka、RabbitMQ、MQTT、轻量消息队列(原MNS) 的消息队列产品体系,全系产品 Serverless 化。RocketMQ 一站式学习:https://rocketmq.io/

热门讨论

热门文章

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载