[
https://issues.apache.org/jira/browse/KAFKA-19393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18036846#comment-18036846
]
sanghyeok An commented on KAFKA-19393:
--------------------------------------
[~lianetm]
If this issue should support both legacy consumer protocol and new consumer
protocol,
I think it would be better to separate `AssignState` into `LegacyAssignState`
and `NewAssignState` with `AssignState` interface.
Because, I think
In new consumer protocol, MembershipMgr has state about assign.
However, it will not be used for legacy consumer protocol.
So, I think it would be better to provide
* `AssignState` interace to provide common API to set and get assign metadata.
* `LegacyAssignState` class for Legacy Consumer Protocol assigned state and
implements `AssignState`
* `NewAssignState` class for New Consumer Protocol assigned state and
implements `AssignState`
What do you think?
When you have time, Please share your opinion. :)
> Consolidate consumer assignment state views
> -------------------------------------------
>
> Key: KAFKA-19393
> URL: https://issues.apache.org/jira/browse/KAFKA-19393
> Project: Kafka
> Issue Type: Improvement
> Components: clients, consumer
> Reporter: Lianet Magrans
> Assignee: sanghyeok An
> Priority: Major
> Labels: kip-848-client-support
> Fix For: 4.2.0
>
>
> Currently the consumer assignment state is partly in the SubscriptionState
> (where group assignment is updated for both protocols), and in the
> ConsumerMembershipMgr (where assignment is initially received in HB responses
> and reconciled with the new Consumer protocol).
> We should consider extracting the assignment state to have a single view of
> it, that could be used from the SubscriptionState and the MembershipMgrs.
> More context in PR comment (when dealing with making assigned topic IDs
> available in the SubscriptionState, as they are needed to request metadata
> for topics assigned when using broker-side regex)
> https://github.com/apache/kafka/pull/19814#discussion_r2131673167
--
This message was sent by Atlassian Jira
(v8.20.10#820010)