lianetm commented on code in PR #14323: URL: https://github.com/apache/kafka/pull/14323#discussion_r1319899063
########## clients/src/main/java/org/apache/kafka/clients/consumer/internals/MemberState.java: ########## @@ -0,0 +1,69 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.kafka.clients.consumer.internals; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public enum MemberState { + + /** + * Member has not joined a consumer group yet + */ + UNJOINED, + + /** + * Member has received a new assignment (partitions assigned or revoked), and it is applying + * it. While in this state, the member will invoke the user callbacks for + * onPartitionsAssigned or onPartitionsRevoked, and then make the new assignment effective. + */ + // TODO: determine if separate state will be needed for assign/revoke (not for now) + PROCESSING_ASSIGNMENT, + + /** + * Member is active in a group (heartbeating) and has processed all assignments received. + */ + STABLE, + + /** + * The member failed with an unrecoverable error + */ + FAILED; Review Comment: Totally, added the state and its valid transitions. I also updated the doc for both error states to reflect the differences. -- 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]
