开发者社区> 问答> 正文

canal.mq.partitionsNum参数的bug

背景

使用canal发送阿里云rocketMQ 云服务 配置分区参数如下

canal.mq.partitionsNum=24 canal.mq.partitionHash=.\..:id

运行正常几个月的情况,突然报了如下错误,后来修改成

canal.mq.partitionsNum=16 canal.mq.partitionHash=.\..:id

问题解决

想知道为什么 topic的队列数是动态调整的?

2021-01-22 09:10:22.284 [canal-instance-scan-0] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - stop CannalInstance for null-reconciliation_canal_instance 2021-01-22 09:10:22.290 [canal-instance-scan-0] INFO c.a.otter.canal.instance.core.AbstractCanalInstance - stop successful.... 2021-01-22 09:10:22.311 [pool-55-thread-3] ERROR com.alibaba.otter.canal.rocketmq.CanalRocketMQProducer - send flat message to hashed partition error org.apache.rocketmq.client.exception.MQClientException: select message queue throwed exception. For more information, please visit the url, http://rocketmq.apache.org/docs/faq/ at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.sendSelectImpl(DefaultMQProducerImpl.java:1094) ~[rocketmq-client-4.5.2.jar:4.5.2] at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.send(DefaultMQProducerImpl.java:1068) ~[rocketmq-client-4.5.2.jar:4.5.2] at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.send(DefaultMQProducerImpl.java:1063) ~[rocketmq-client-4.5.2.jar:4.5.2] at org.apache.rocketmq.client.producer.DefaultMQProducer.send(DefaultMQProducer.java:524) ~[rocketmq-client-4.5.2.jar:4.5.2] at com.alibaba.otter.canal.rocketmq.CanalRocketMQProducer.sendMessage(CanalRocketMQProducer.java:195) [canal.server-1.1.4.jar:na] at com.alibaba.otter.canal.rocketmq.CanalRocketMQProducer.send(CanalRocketMQProducer.java:161) [canal.server-1.1.4.jar:na] at com.alibaba.otter.canal.rocketmq.CanalRocketMQProducer.send(CanalRocketMQProducer.java:87) [canal.server-1.1.4.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter.worker(CanalMQStarter.java:183) [canal.server-1.1.4.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter.access$500(CanalMQStarter.java:23) [canal.server-1.1.4.jar:na] at com.alibaba.otter.canal.server.CanalMQStarter$CanalMQRunnable.run(CanalMQStarter.java:225) [canal.server-1.1.4.jar:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_181] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_181] at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181] Caused by: java.lang.IndexOutOfBoundsException: Index: 16, Size: 16 at java.util.ArrayList.rangeCheck(ArrayList.java:657) ~[na:1.8.0_181] at java.util.ArrayList.get(ArrayList.java:433) ~[na:1.8.0_181] at com.alibaba.otter.canal.rocketmq.CanalRocketMQProducer$1.select(CanalRocketMQProducer.java:202) ~[canal.server-1.1.4.jar:na] at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.sendSelectImpl(DefaultMQProducerImpl.java:1092) ~[rocketmq-client-4.5.2.jar:4.5.2] ... 12 common frames omitted

原提问者GitHub用户farsunset

展开
收起
山海行 2023-04-27 19:00:21 112 0
1 条回答
写回答
取消 提交回答
  • 先考虑使用1.1.5版本

    原回答者GitHub用户agapple

    2023-04-28 13:49:21
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
RocketMQ Client-GO 介绍 立即下载
RocketMQ Prometheus Exporter 打造定制化 DevOps 平台 立即下载
基于 RocketMQ Prometheus Exporter 打造定制化 DevOps 平台 立即下载