在使用rocketmq的demo发送消息时,一直报如下错误
Exception in thread “main” org.apache.rocketmq.remoting.exception.RemotingTooMuchRequestException: sendDefaultImpl call timeout
at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.sendDefaultImpl(DefaultMQProducerImpl.java:640)
at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.send(DefaultMQProducerImpl.java:1310)
at org.apache.rocketmq.client.impl.producer.DefaultMQProducerImpl.send(DefaultMQProducerImpl.java:1256)
at org.apache.rocketmq.client.producer.DefaultMQProducer.send(DefaultMQProducer.java:339)
at com.daiyanping.cms.rocketmq.nativeapi.ordermessage.all.ProducerAllOrder.main(ProducerAllOrder.java:23)
已经加了brokerIP1=127.0.0.1 的配置项,但是就是不行
然后把发送消息的代码加了个超时时间就可以了
SendResult sendResult = producer.send(msg, 100000);
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)