aaron-ai commented on code in PR #665:
URL: https://github.com/apache/rocketmq-clients/pull/665#discussion_r1448452521
##########
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:
Add more tests here?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]