diff --git a/client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java b/client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java index fca50cc565ceb398d66f5c1d28d98467396db221..2f171ae1e3a26ed810474162b031d09812b41d1d 100644 --- a/client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java +++ b/client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java @@ -1356,12 +1356,12 @@ public class DefaultMQProducerImpl implements MQProducerInner { this.sendDefaultImpl(msg, CommunicationMode.ASYNC, new SendCallback() { @Override public void onSuccess(SendResult sendResult) { - requestResponseFuture.setSendReqeustOk(true); + requestResponseFuture.setSendRequestOk(true); } @Override public void onException(Throwable e) { - requestResponseFuture.setSendReqeustOk(false); + requestResponseFuture.setSendRequestOk(false); requestResponseFuture.putResponseMessage(null); requestResponseFuture.setCause(e); } @@ -1395,7 +1395,7 @@ public class DefaultMQProducerImpl implements MQProducerInner { this.sendDefaultImpl(msg, CommunicationMode.ASYNC, new SendCallback() { @Override public void onSuccess(SendResult sendResult) { - requestResponseFuture.setSendReqeustOk(true); + requestResponseFuture.setSendRequestOk(true); } @Override @@ -1421,12 +1421,12 @@ public class DefaultMQProducerImpl implements MQProducerInner { this.sendSelectImpl(msg, selector, arg, CommunicationMode.ASYNC, new SendCallback() { @Override public void onSuccess(SendResult sendResult) { - requestResponseFuture.setSendReqeustOk(true); + requestResponseFuture.setSendRequestOk(true); } @Override public void onException(Throwable e) { - requestResponseFuture.setSendReqeustOk(false); + requestResponseFuture.setSendRequestOk(false); requestResponseFuture.putResponseMessage(null); requestResponseFuture.setCause(e); } @@ -1461,7 +1461,7 @@ public class DefaultMQProducerImpl implements MQProducerInner { this.sendSelectImpl(msg, selector, arg, CommunicationMode.ASYNC, new SendCallback() { @Override public void onSuccess(SendResult sendResult) { - requestResponseFuture.setSendReqeustOk(true); + requestResponseFuture.setSendRequestOk(true); } @Override @@ -1487,12 +1487,12 @@ public class DefaultMQProducerImpl implements MQProducerInner { this.sendKernelImpl(msg, mq, CommunicationMode.ASYNC, new SendCallback() { @Override public void onSuccess(SendResult sendResult) { - requestResponseFuture.setSendReqeustOk(true); + requestResponseFuture.setSendRequestOk(true); } @Override public void onException(Throwable e) { - requestResponseFuture.setSendReqeustOk(false); + requestResponseFuture.setSendRequestOk(false); requestResponseFuture.putResponseMessage(null); requestResponseFuture.setCause(e); } @@ -1526,7 +1526,7 @@ public class DefaultMQProducerImpl implements MQProducerInner { this.sendKernelImpl(msg, mq, CommunicationMode.ASYNC, new SendCallback() { @Override public void onSuccess(SendResult sendResult) { - requestResponseFuture.setSendReqeustOk(true); + requestResponseFuture.setSendRequestOk(true); } @Override @@ -1540,7 +1540,7 @@ public class DefaultMQProducerImpl implements MQProducerInner { private void requestFail(final String correlationId) { RequestResponseFuture responseFuture = RequestFutureTable.getRequestFutureTable().remove(correlationId); if (responseFuture != null) { - responseFuture.setSendReqeustOk(false); + responseFuture.setSendRequestOk(false); responseFuture.putResponseMessage(null); try { responseFuture.executeRequestCallback(); diff --git a/client/src/main/java/org/apache/rocketmq/client/producer/RequestResponseFuture.java b/client/src/main/java/org/apache/rocketmq/client/producer/RequestResponseFuture.java index c54b236b1616fcf9d4f586af8ac2f1e52d09c85f..e66c08fdc534b7e8ac57ad083565652b88106704 100644 --- a/client/src/main/java/org/apache/rocketmq/client/producer/RequestResponseFuture.java +++ b/client/src/main/java/org/apache/rocketmq/client/producer/RequestResponseFuture.java @@ -103,8 +103,8 @@ public class RequestResponseFuture { return sendRequestOk; } - public void setSendReqeustOk(boolean sendReqeustOk) { - this.sendRequestOk = sendReqeustOk; + public void setSendRequestOk(boolean sendRequestOk) { + this.sendRequestOk = sendRequestOk; } public Message getRequestMsg() { diff --git a/client/src/test/java/org/apache/rocketmq/client/producer/DefaultMQProducerTest.java b/client/src/test/java/org/apache/rocketmq/client/producer/DefaultMQProducerTest.java index d572a2320e30eecbb91bf74b4e80a784a971937d..41046fcdf52cca9b675825fa51f370f4292df9d9 100644 --- a/client/src/test/java/org/apache/rocketmq/client/producer/DefaultMQProducerTest.java +++ b/client/src/test/java/org/apache/rocketmq/client/producer/DefaultMQProducerTest.java @@ -373,7 +373,7 @@ public class DefaultMQProducerTest { assertThat(responseMap).isNotNull(); for (Map.Entry entry : responseMap.entrySet()) { RequestResponseFuture future = entry.getValue(); - future.setSendReqeustOk(true); + future.setSendRequestOk(true); message.setFlag(1); future.getRequestCallback().onSuccess(message); } diff --git a/client/src/test/java/org/apache/rocketmq/client/producer/RequestResponseFutureTest.java b/client/src/test/java/org/apache/rocketmq/client/producer/RequestResponseFutureTest.java index 90e4623e9b486770b1740d090a2dc9f05aca51f5..bc20873c11436d2c1b308180842d7f17b121080d 100644 --- a/client/src/test/java/org/apache/rocketmq/client/producer/RequestResponseFutureTest.java +++ b/client/src/test/java/org/apache/rocketmq/client/producer/RequestResponseFutureTest.java @@ -37,7 +37,7 @@ public class RequestResponseFutureTest { @Override public void onException(Throwable e) { } }); - future.setSendReqeustOk(true); + future.setSendRequestOk(true); future.executeRequestCallback(); assertThat(cc.get()).isEqualTo(1); }