frankvicky commented on code in PR #17614:
URL: https://github.com/apache/kafka/pull/17614#discussion_r1818347761
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractMembershipManager.java:
##########
@@ -79,6 +80,11 @@ public abstract class AbstractMembershipManager<R extends
AbstractResponse> impl
*/
protected final String groupId;
+ /**
+ * Group instance ID to be used by the member, provided when creating the
current membership manager.
+ */
+ protected final Optional<String> groupInstanceId;
Review Comment:
https://github.com/apache/kafka/blob/24689dc6ab8f94ba4e7f33f1e874c06d8e29efa1/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractHeartbeatRequestManager.java#L198
Since I need to access `groupInstanceId` in
`AbstractHeartbeatRequestManager#pollOnClose` to determine whether a member is
static, I extracted this property into the superclass.
Another approach that came to mind is to declare an abstract method
`isStaticMember` in `AbstractMembershipManager`,this way, the shared consumer
wouldn't hold an unnecessary property,which might be a better solution. 🤔
--
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]