@Test public void testSetCallbackExecutor() throws MQClientException { String producerGroupTemp = "testSetCallbackExecutor_" + System.currentTimeMillis(); producer = new DefaultMQProducer(producerGroupTemp); producer.setNamesrvAddr("127.0.0.1:9876"); producer.start(); ExecutorService customized = Executors.newCachedThreadPool(); producer.setCallbackExecutor(customized); NettyRemotingClient remotingClient = (NettyRemotingClient) producer.getDefaultMQProducerImpl() .getmQClientFactory().getMQClientAPIImpl().getRemotingClient(); assertThat(remotingClient.getCallbackExecutor()).isEqualTo(customized); }
public void setCallbackExecutor(final ExecutorService callbackExecutor) { this.defaultMQProducerImpl.setCallbackExecutor(callbackExecutor); }
DefaultMQProducer extends ClientConfig implements MQProducer { public void setCallbackExecutor(final ExecutorService callbackExecutor) { this.defaultMQProducerImpl.setCallbackExecutor(callbackExecutor); } }
DefaultMQProducer extends ClientConfig implements MQProducer { public void setCallbackExecutor(final ExecutorService callbackExecutor) { this.defaultMQProducerImpl.setCallbackExecutor(callbackExecutor); } DefaultMQProducer();  DefaultMQProducer(final String producerGroup, RPCHook rpcHook);  DefaultMQProducer(final String producerGroup, RPCHook rpcHook, boolean enableMsgTrace,final String customizedTraceTopic);  DefaultMQProducer(final String producerGroup);  DefaultMQProducer(final String producerGroup, boolean enableMsgTrace);  DefaultMQProducer(final String producerGroup, boolean enableMsgTrace, final String customizedTraceTopic);  DefaultMQProducer(RPCHook rpcHook); }
DefaultMQProducer extends ClientConfig implements MQProducer { public void setCallbackExecutor(final ExecutorService callbackExecutor) { this.defaultMQProducerImpl.setCallbackExecutor(callbackExecutor); } DefaultMQProducer();  DefaultMQProducer(final String producerGroup, RPCHook rpcHook);  DefaultMQProducer(final String producerGroup, RPCHook rpcHook, boolean enableMsgTrace,final String customizedTraceTopic);  DefaultMQProducer(final String producerGroup);  DefaultMQProducer(final String producerGroup, boolean enableMsgTrace);  DefaultMQProducer(final String producerGroup, boolean enableMsgTrace, final String customizedTraceTopic);  DefaultMQProducer(RPCHook rpcHook); @Override void start(); @Override void shutdown(); @Override List<MessageQueue> fetchPublishMessageQueues(String topic); @Override SendResult send(
        Message msg); @Override SendResult send(Message msg,
        long timeout); @Override void send(Message msg,
        SendCallback sendCallback); @Override void send(Message msg, SendCallback sendCallback, long timeout); @Override void sendOneway(Message msg); @Override SendResult send(Message msg, MessageQueue mq); @Override SendResult send(Message msg, MessageQueue mq, long timeout); @Override void send(Message msg, MessageQueue mq, SendCallback sendCallback); @Override void send(Message msg, MessageQueue mq, SendCallback sendCallback, long timeout); @Override void sendOneway(Message msg,
        MessageQueue mq); @Override SendResult send(Message msg, MessageQueueSelector selector, Object arg); @Override SendResult send(Message msg, MessageQueueSelector selector, Object arg, long timeout); @Override void send(Message msg, MessageQueueSelector selector, Object arg, SendCallback sendCallback); @Override void send(Message msg, MessageQueueSelector selector, Object arg, SendCallback sendCallback, long timeout); @Override void sendOneway(Message msg, MessageQueueSelector selector, Object arg); @Override TransactionSendResult sendMessageInTransaction(Message msg, LocalTransactionExecuter tranExecuter,
        final Object arg); @Override TransactionSendResult sendMessageInTransaction(Message msg,
        Object arg); @Override void createTopic(String key, String newTopic, int queueNum); @Override void createTopic(String key, String newTopic, int queueNum, int topicSysFlag); @Override long searchOffset(MessageQueue mq, long timestamp); @Override long maxOffset(MessageQueue mq); @Override long minOffset(MessageQueue mq); @Override long earliestMsgStoreTime(MessageQueue mq); @Override MessageExt viewMessage(
        String offsetMsgId); @Override QueryResult queryMessage(String topic, String key, int maxNum, long begin, long end); @Override MessageExt viewMessage(String topic,
        String msgId); @Override SendResult send(
        Collection<Message> msgs); @Override SendResult send(Collection<Message> msgs,
        long timeout); @Override SendResult send(Collection<Message> msgs,
        MessageQueue messageQueue); @Override SendResult send(Collection<Message> msgs, MessageQueue messageQueue,
        long timeout); void setCallbackExecutor(final ExecutorService callbackExecutor); void setAsyncSenderExecutor(final ExecutorService asyncSenderExecutor); String getProducerGroup(); void setProducerGroup(String producerGroup); String getCreateTopicKey(); void setCreateTopicKey(String createTopicKey); int getSendMsgTimeout(); void setSendMsgTimeout(int sendMsgTimeout); int getCompressMsgBodyOverHowmuch(); void setCompressMsgBodyOverHowmuch(int compressMsgBodyOverHowmuch); DefaultMQProducerImpl getDefaultMQProducerImpl(); boolean isRetryAnotherBrokerWhenNotStoreOK(); void setRetryAnotherBrokerWhenNotStoreOK(boolean retryAnotherBrokerWhenNotStoreOK); int getMaxMessageSize(); void setMaxMessageSize(int maxMessageSize); int getDefaultTopicQueueNums(); void setDefaultTopicQueueNums(int defaultTopicQueueNums); int getRetryTimesWhenSendFailed(); void setRetryTimesWhenSendFailed(int retryTimesWhenSendFailed); boolean isSendMessageWithVIPChannel(); void setSendMessageWithVIPChannel(final boolean sendMessageWithVIPChannel); long[] getNotAvailableDuration(); void setNotAvailableDuration(final long[] notAvailableDuration); long[] getLatencyMax(); void setLatencyMax(final long[] latencyMax); boolean isSendLatencyFaultEnable(); void setSendLatencyFaultEnable(final boolean sendLatencyFaultEnable); int getRetryTimesWhenSendAsyncFailed(); void setRetryTimesWhenSendAsyncFailed(final int retryTimesWhenSendAsyncFailed); TraceDispatcher getTraceDispatcher(); }
DefaultMQProducer extends ClientConfig implements MQProducer { public void setCallbackExecutor(final ExecutorService callbackExecutor) { this.defaultMQProducerImpl.setCallbackExecutor(callbackExecutor); } DefaultMQProducer();  DefaultMQProducer(final String producerGroup, RPCHook rpcHook);  DefaultMQProducer(final String producerGroup, RPCHook rpcHook, boolean enableMsgTrace,final String customizedTraceTopic);  DefaultMQProducer(final String producerGroup);  DefaultMQProducer(final String producerGroup, boolean enableMsgTrace);  DefaultMQProducer(final String producerGroup, boolean enableMsgTrace, final String customizedTraceTopic);  DefaultMQProducer(RPCHook rpcHook); @Override void start(); @Override void shutdown(); @Override List<MessageQueue> fetchPublishMessageQueues(String topic); @Override SendResult send(
        Message msg); @Override SendResult send(Message msg,
        long timeout); @Override void send(Message msg,
        SendCallback sendCallback); @Override void send(Message msg, SendCallback sendCallback, long timeout); @Override void sendOneway(Message msg); @Override SendResult send(Message msg, MessageQueue mq); @Override SendResult send(Message msg, MessageQueue mq, long timeout); @Override void send(Message msg, MessageQueue mq, SendCallback sendCallback); @Override void send(Message msg, MessageQueue mq, SendCallback sendCallback, long timeout); @Override void sendOneway(Message msg,
        MessageQueue mq); @Override SendResult send(Message msg, MessageQueueSelector selector, Object arg); @Override SendResult send(Message msg, MessageQueueSelector selector, Object arg, long timeout); @Override void send(Message msg, MessageQueueSelector selector, Object arg, SendCallback sendCallback); @Override void send(Message msg, MessageQueueSelector selector, Object arg, SendCallback sendCallback, long timeout); @Override void sendOneway(Message msg, MessageQueueSelector selector, Object arg); @Override TransactionSendResult sendMessageInTransaction(Message msg, LocalTransactionExecuter tranExecuter,
        final Object arg); @Override TransactionSendResult sendMessageInTransaction(Message msg,
        Object arg); @Override void createTopic(String key, String newTopic, int queueNum); @Override void createTopic(String key, String newTopic, int queueNum, int topicSysFlag); @Override long searchOffset(MessageQueue mq, long timestamp); @Override long maxOffset(MessageQueue mq); @Override long minOffset(MessageQueue mq); @Override long earliestMsgStoreTime(MessageQueue mq); @Override MessageExt viewMessage(
        String offsetMsgId); @Override QueryResult queryMessage(String topic, String key, int maxNum, long begin, long end); @Override MessageExt viewMessage(String topic,
        String msgId); @Override SendResult send(
        Collection<Message> msgs); @Override SendResult send(Collection<Message> msgs,
        long timeout); @Override SendResult send(Collection<Message> msgs,
        MessageQueue messageQueue); @Override SendResult send(Collection<Message> msgs, MessageQueue messageQueue,
        long timeout); void setCallbackExecutor(final ExecutorService callbackExecutor); void setAsyncSenderExecutor(final ExecutorService asyncSenderExecutor); String getProducerGroup(); void setProducerGroup(String producerGroup); String getCreateTopicKey(); void setCreateTopicKey(String createTopicKey); int getSendMsgTimeout(); void setSendMsgTimeout(int sendMsgTimeout); int getCompressMsgBodyOverHowmuch(); void setCompressMsgBodyOverHowmuch(int compressMsgBodyOverHowmuch); DefaultMQProducerImpl getDefaultMQProducerImpl(); boolean isRetryAnotherBrokerWhenNotStoreOK(); void setRetryAnotherBrokerWhenNotStoreOK(boolean retryAnotherBrokerWhenNotStoreOK); int getMaxMessageSize(); void setMaxMessageSize(int maxMessageSize); int getDefaultTopicQueueNums(); void setDefaultTopicQueueNums(int defaultTopicQueueNums); int getRetryTimesWhenSendFailed(); void setRetryTimesWhenSendFailed(int retryTimesWhenSendFailed); boolean isSendMessageWithVIPChannel(); void setSendMessageWithVIPChannel(final boolean sendMessageWithVIPChannel); long[] getNotAvailableDuration(); void setNotAvailableDuration(final long[] notAvailableDuration); long[] getLatencyMax(); void setLatencyMax(final long[] latencyMax); boolean isSendLatencyFaultEnable(); void setSendLatencyFaultEnable(final boolean sendLatencyFaultEnable); int getRetryTimesWhenSendAsyncFailed(); void setRetryTimesWhenSendAsyncFailed(final int retryTimesWhenSendAsyncFailed); TraceDispatcher getTraceDispatcher();  }