chia7712 commented on code in PR #17418:
URL: https://github.com/apache/kafka/pull/17418#discussion_r1805016907
##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/events/ApplicationEventProcessor.java:
##########
@@ -358,12 +358,19 @@ private void process(final ShareAcknowledgeAsyncEvent
event) {
* consumer join the share group if it is not part of it yet, or send the
updated subscription if
* it is already a member.
*/
- private void process(final ShareSubscriptionChangeEvent ignored) {
+ private void process(final ShareSubscriptionChangeEvent event) {
if (!requestManagers.shareHeartbeatRequestManager.isPresent()) {
- log.warn("Group membership manager not present when processing a
subscribe event");
+ KafkaException error = new KafkaException("Group membership
manager not present when processing a subscribe event");
+ event.future().completeExceptionally(error);
return;
}
+
+ if (subscriptions.subscribeToShareGroup(event.topics()))
+ metadata.requestUpdateForNewTopics();
Review Comment:
@FrankYang0529 `FETCH_SESSION_TOPIC_ID_ERROR` is considered a recoverable
error, so the consumer will update the metadata upon encountering it.
Additionally, the heartbeat with the new subscription will trigger a group
bump, leading to a rebalance. That's why your test case doesn't observe the
error.
--
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]