Skip to content

wait response timeout 0ms #2287

Description

@bitoceango

hello,Can someone help me?
When I producer message to Broker fast,i get below exception:

org.apache.rocketmq.client.exception.MQClientException: wait response timeout 0ms
For more information, please visit the url, http://rocketmq.apache.org/docs/faq/
  at org.apache.rocketmq.client.impl.MQClientAPIImpl$1.operationComplete(MQClientAPIImpl.java:416)
  at org.apache.rocketmq.remoting.netty.ResponseFuture.executeInvokeCallback(ResponseFuture.java:51)
  at org.apache.rocketmq.remoting.netty.NettyRemotingAbstract$2.run(NettyRemotingAbstract.java:286)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  at java.lang.Thread.run(Thread.java:748)

I read the source code, but did not find the reason, why is the timeout 0ms? I did not set the timeout time separately, the timeout time should be the default 3000ms.

my producer config is :

public class MessageProducer  {
    private DefaultMQProducer producer = new DefaultMQProducer();
    public MessageProducer() {
        producer.setNamesrvAddr("xxxxxx");
        producer.setProducerGroup("yxshi-request-copy-Group");
        try {
            producer.start();
            log.info("mq producer start success");
        } catch (MQClientException e) {
            log.error("", e);
        }
        producer.setRetryTimesWhenSendAsyncFailed(1);
    }
    public void send( Message message) {
        try {
               producer.send(message, new SendCallback() {
                @Override
                public void onSuccess(SendResult sendResult) {
                    log.info("消息发送成功,{}", sendResult);
                }
                @Override
                public void onException(Throwable e) {
                    log.error("消息发送失败,{}", e);
                }
            });
        } catch (Exception e) {
            log.error("消息发送失败", e);
        }
    }
    @PreDestroy
    public  void shutdown()throws Exception{
        producer.shutdown();
    }
}

Can anyone give some advice?thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions