twmb / franz-go

franz-go contains a feature complete, pure Go library for interacting with Kafka from 0.8.0 through 3.7+. Producing, consuming, transacting, administrating, etc.
BSD 3-Clause "New" or "Revised" License
1.76k stars 175 forks source link

`GetConsumeTopics` returns all topics when consuming via regex, not just the topics that are being consumed #810

Open twmb opened 2 weeks ago

twmb commented 2 weeks ago

Also maybe GetConsumeTopics does not return topics until after consuming has happened? This makes sense for regex but not for non-regex.

mihaitodor commented 2 weeks ago

When you say "consuming has happened", do you mean reading messages? It would be convenient to be able to just enumerate the matched topics up front when using kgo.ConsumeRegex(), but not sure if the protocol allows it.