JimmyWang6 commented on PR #14327:
URL: https://github.com/apache/kafka/pull/14327#issuecomment-1873362395
@
> @JimmyWang6 , I think for this part
>
> > What if a new topic gets created which matches the regex subscription of
some member.
>
> we need to use the metadata update mechanism defined by
`metadata.max.age.ms`. This is the interval using which the consumer will keep
refreshing the metadata and do the pattern matching periodically against all
topics existing at the time of check. Having said that, this looks like a
client level config so not sure if it needs to be part of this PR. @dajac ,
WDYT?
@dajac @vamossagar12
Thank you for your comments!
I have added more unit tests and addressed the issues mentioned in the
previous comments. In the case of a newly created topic that matches the regex
subscription of certain members, I believe the method public void
**onNewMetadataImage(MetadataImage newImage, MetadataDelta delta)** will be
invoked. Therefore, I have made modifications to the groupsSubscribedToTopic
method to identify the consumer groups that have subscribed to topics matching
the regular expression and requested a metadata refresh for those groups.
The latest code appears to be functioning well. Do you have any further
comments or suggestions regarding this approach?
--
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]