This is an automated email from the ASF dual-hosted git repository. lollipop pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git
The following commit(s) were added to refs/heads/master by this push: new 7d557936 fix (#895) 7d557936 is described below commit 7d557936baa0d77daf405a6bd93b875607a7e56f Author: qianye <wuxingcan....@alibaba-inc.com> AuthorDate: Fri Dec 27 16:38:11 2024 +0800 fix (#895) --- .../apache/rocketmq/client/java/impl/consumer/PushConsumerImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/client/src/main/java/org/apache/rocketmq/client/java/impl/consumer/PushConsumerImpl.java b/java/client/src/main/java/org/apache/rocketmq/client/java/impl/consumer/PushConsumerImpl.java index 2cbc6d02..e4489033 100644 --- a/java/client/src/main/java/org/apache/rocketmq/client/java/impl/consumer/PushConsumerImpl.java +++ b/java/client/src/main/java/org/apache/rocketmq/client/java/impl/consumer/PushConsumerImpl.java @@ -255,6 +255,9 @@ class PushConsumerImpl extends ConsumerImpl implements PushConsumer { private ListenableFuture<Endpoints> pickEndpointsToQueryAssignments(String topic) { final ListenableFuture<TopicRouteData> future = getRouteData(topic); return Futures.transformAsync(future, topicRouteData -> { + if (topicRouteData.getTotalEndpoints().contains(this.getEndpoints())) { + return Futures.immediateFuture(this.getEndpoints()); + } Endpoints endpoints = topicRouteData.pickEndpointsToQueryAssignments(); return Futures.immediateFuture(endpoints); }, MoreExecutors.directExecutor());