From 55a05b55cab9515ba9769fa3cfd479c2adafd817 Mon Sep 17 00:00:00 2001 From: wlliqipeng Date: Wed, 31 Oct 2018 15:29:20 +0800 Subject: [PATCH 1/3] add @deprecated in MQClientInstance and ClientConfig --- .../org/apache/rocketmq/client/consumer/MQPushConsumer.java | 1 + .../apache/rocketmq/client/impl/factory/MQClientInstance.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/main/java/org/apache/rocketmq/client/consumer/MQPushConsumer.java b/client/src/main/java/org/apache/rocketmq/client/consumer/MQPushConsumer.java index d56075c609..4cabf8f542 100644 --- a/client/src/main/java/org/apache/rocketmq/client/consumer/MQPushConsumer.java +++ b/client/src/main/java/org/apache/rocketmq/client/consumer/MQPushConsumer.java @@ -60,6 +60,7 @@ public interface MQPushConsumer extends MQConsumer { * @param fullClassName full class name,must extend org.apache.rocketmq.common.filter. MessageFilter * @param filterClassSource class source code,used UTF-8 file encoding,must be responsible for your code safety */ + @Deprecated void subscribe(final String topic, final String fullClassName, final String filterClassSource) throws MQClientException; diff --git a/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java b/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java index 1b38856291..eb984a8064 100644 --- a/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java +++ b/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java @@ -720,7 +720,7 @@ private boolean isBrokerInNameServer(final String brokerAddr) { return false; } - + @Deprecated private void uploadFilterClassToAllFilterServer(final String consumerGroup, final String fullClassName, final String topic, final String filterClassSource) throws UnsupportedEncodingException { From 1297970440b823a9c3e15c9df6bc8e04f5609ea5 Mon Sep 17 00:00:00 2001 From: wlliqipeng Date: Wed, 31 Oct 2018 16:44:35 +0800 Subject: [PATCH 2/3] add note --- .../org/apache/rocketmq/client/consumer/MQPushConsumer.java | 3 +++ .../apache/rocketmq/client/impl/factory/MQClientInstance.java | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/client/src/main/java/org/apache/rocketmq/client/consumer/MQPushConsumer.java b/client/src/main/java/org/apache/rocketmq/client/consumer/MQPushConsumer.java index 4cabf8f542..4f2e9e8f9e 100644 --- a/client/src/main/java/org/apache/rocketmq/client/consumer/MQPushConsumer.java +++ b/client/src/main/java/org/apache/rocketmq/client/consumer/MQPushConsumer.java @@ -55,6 +55,9 @@ public interface MQPushConsumer extends MQConsumer { void subscribe(final String topic, final String subExpression) throws MQClientException; /** + * This method will be removed in the version 5.0.0,because filterServer was removed,and method subscribe(final String topic, final MessageSelector messageSelector) + * is recommended. + * * Subscribe some topic * * @param fullClassName full class name,must extend org.apache.rocketmq.common.filter. MessageFilter diff --git a/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java b/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java index eb984a8064..c8a7274a8f 100644 --- a/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java +++ b/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java @@ -720,6 +720,10 @@ private boolean isBrokerInNameServer(final String brokerAddr) { return false; } + /** + * This method will be removed in the version 5.0.0,because filterServer was removed,and method subscribe(final String topic, final MessageSelector messageSelector) + * is recommended. + */ @Deprecated private void uploadFilterClassToAllFilterServer(final String consumerGroup, final String fullClassName, final String topic, From 4ca1a71c9ea0a457a0ce0484009d4cfad46b444a Mon Sep 17 00:00:00 2001 From: wlliqipeng Date: Wed, 31 Oct 2018 17:00:35 +0800 Subject: [PATCH 3/3] no message --- .../org/apache/rocketmq/client/consumer/MQPushConsumer.java | 4 ++-- .../apache/rocketmq/client/impl/factory/MQClientInstance.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/main/java/org/apache/rocketmq/client/consumer/MQPushConsumer.java b/client/src/main/java/org/apache/rocketmq/client/consumer/MQPushConsumer.java index 4f2e9e8f9e..bc6d328c43 100644 --- a/client/src/main/java/org/apache/rocketmq/client/consumer/MQPushConsumer.java +++ b/client/src/main/java/org/apache/rocketmq/client/consumer/MQPushConsumer.java @@ -55,9 +55,9 @@ public interface MQPushConsumer extends MQConsumer { void subscribe(final String topic, final String subExpression) throws MQClientException; /** - * This method will be removed in the version 5.0.0,because filterServer was removed,and method subscribe(final String topic, final MessageSelector messageSelector) + * This method will be removed in the version 5.0.0,because filterServer was removed,and method subscribe(final String topic, final MessageSelector messageSelector) * is recommended. - * + * * Subscribe some topic * * @param fullClassName full class name,must extend org.apache.rocketmq.common.filter. MessageFilter diff --git a/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java b/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java index c8a7274a8f..9ffaed0a4f 100644 --- a/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java +++ b/client/src/main/java/org/apache/rocketmq/client/impl/factory/MQClientInstance.java @@ -721,7 +721,7 @@ private boolean isBrokerInNameServer(final String brokerAddr) { return false; } /** - * This method will be removed in the version 5.0.0,because filterServer was removed,and method subscribe(final String topic, final MessageSelector messageSelector) + * This method will be removed in the version 5.0.0,because filterServer was removed,and method subscribe(final String topic, final MessageSelector messageSelector) * is recommended. */ @Deprecated