glcrazier commented on code in PR #665:
URL: https://github.com/apache/rocketmq-clients/pull/665#discussion_r1448457023


##########
java/client/src/main/java/org/apache/rocketmq/client/java/impl/consumer/PushConsumerImpl.java:
##########
@@ -389,6 +390,14 @@ public void onSuccess(Assignments latest) {
                             }
                             log.info("Attention!!! acquired empty assignments 
from remote, but existed assignments"
                                 + " is not empty, topic={}, clientId={}", 
topic, clientId);
+                        } else {
+                            List<Assignment> newAssignmentList = new 
ArrayList<>(latest.getAssignmentList().size());
+                            for (Assignment assignment : 
latest.getAssignmentList()) {
+                                if 
(assignment.getMessageQueue().getPermission().isReadable()) {
+                                    newAssignmentList.add(assignment);
+                                }
+                            }
+                            latest = new Assignments(newAssignmentList);

Review Comment:
   sure, will do.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to