背景
使用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
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。