From f5c9aaa6487d1c916481d06be9fd314ecc7dcd01 Mon Sep 17 00:00:00 2001 From: duhenglucky Date: Thu, 4 Apr 2019 15:22:58 +0800 Subject: [PATCH] Deprecate sendMessageBack for change it's visibilty in the future --- .../client/consumer/DefaultMQPullConsumer.java | 12 ++++++++++-- .../client/consumer/DefaultMQPushConsumer.java | 8 ++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPullConsumer.java b/client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPullConsumer.java index 5ffb6ac2..f4c63df4 100644 --- a/client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPullConsumer.java +++ b/client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPullConsumer.java @@ -186,7 +186,6 @@ public class DefaultMQPullConsumer extends ClientConfig implements MQPullConsume return brokerSuspendMaxTimeMillis; } - /** * This method will be removed in a certain version after April 5, 2020, so please do not use this method. */ @@ -243,12 +242,22 @@ public class DefaultMQPullConsumer extends ClientConfig implements MQPullConsume this.registerTopics = registerTopics; } + /** + * This method will be removed or it's visibility will be changed in a certain version after April 5, 2020, so + * please do not use this method. + */ + @Deprecated @Override public void sendMessageBack(MessageExt msg, int delayLevel) throws RemotingException, MQBrokerException, InterruptedException, MQClientException { this.defaultMQPullConsumerImpl.sendMessageBack(msg, delayLevel, null); } + /** + * This method will be removed or it's visibility will be changed in a certain version after April 5, 2020, so + * please do not use this method. + */ + @Deprecated @Override public void sendMessageBack(MessageExt msg, int delayLevel, String brokerName) throws RemotingException, MQBrokerException, InterruptedException, MQClientException { @@ -385,7 +394,6 @@ public class DefaultMQPullConsumer extends ClientConfig implements MQPullConsume return offsetStore; } - /** * This method will be removed in a certain version after April 5, 2020, so please do not use this method. */ diff --git a/client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java b/client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java index 4ea741c9..3a0f2be9 100644 --- a/client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java +++ b/client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java @@ -579,6 +579,9 @@ public class DefaultMQPushConsumer extends ClientConfig implements MQPushConsume /** * Send message back to broker which will be re-delivered in future. * + * This method will be removed or it's visibility will be changed in a certain version after April 5, 2020, so + * please do not use this method. + * * @param msg Message to send back. * @param delayLevel delay level. * @throws RemotingException if there is any network-tier error. @@ -586,6 +589,7 @@ public class DefaultMQPushConsumer extends ClientConfig implements MQPushConsume * @throws InterruptedException if the thread is interrupted. * @throws MQClientException if there is any client error. */ + @Deprecated @Override public void sendMessageBack(MessageExt msg, int delayLevel) throws RemotingException, MQBrokerException, InterruptedException, MQClientException { @@ -596,6 +600,9 @@ public class DefaultMQPushConsumer extends ClientConfig implements MQPushConsume * Send message back to the broker whose name is brokerName and the message will be re-delivered in * future. * + * This method will be removed or it's visibility will be changed in a certain version after April 5, 2020, so + * please do not use this method. + * * @param msg Message to send back. * @param delayLevel delay level. * @param brokerName broker name. @@ -604,6 +611,7 @@ public class DefaultMQPushConsumer extends ClientConfig implements MQPushConsume * @throws InterruptedException if the thread is interrupted. * @throws MQClientException if there is any client error. */ + @Deprecated @Override public void sendMessageBack(MessageExt msg, int delayLevel, String brokerName) throws RemotingException, MQBrokerException, InterruptedException, MQClientException { -- GitLab