Producer老是报错,我在虚拟机上面启动了 NamesrvStartup和 BrokerStartup,并且在启动broker之前,已经指定nameserver,
在Producer代码中,也指定了nameserver
producer.setNamesrvAddr("192.168.74.129:9876");
同时在Consumer代码中也指定了nameserver
consumer.setNamesrvAddr("192.168.74.129:9876");
运行Producer。错误信息:
com.alibaba.rocketmq.client.exception.MQClientException: Send [1] times, still failed, cost [1490]ms, Topic: TopicTest1, BrokersSent: [localhost.localdomain, null, null]
by: com.alibaba.rocketmq.remoting.exception.RemotingConnectException: connect to <> failed
at com.alibaba.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:355)
at com.alibaba.rocketmq.client.impl.MQClientAPIImpl.sendMessageSync(MQClientAPIImpl.java:270)
at com.alibaba.rocketmq.client.impl.MQClientAPIImpl.sendMessage(MQClientAPIImpl.java:253)
at com.alibaba.rocketmq.client.impl.MQClientAPIImpl.sendMessage(MQClientAPIImpl.java:216)
at com.alibaba.rocketmq.client.impl.producer.DefaultMQProducerImpl.sendKernelImpl(DefaultMQProducerImpl.java:611)
at com.alibaba.rocketmq.client.impl.producer.DefaultMQProducerImpl.sendDefaultImpl(DefaultMQProducerImpl.java:413)
-------------------------
-------------------------
-------------------------
vipchannel是用于读写分离到。
开源的rocketmq暂时还不支持该特性。
建议使用3.2.6的client!
-------------------------
-------------------------
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。