hunter2046 edited a comment on pull request #507: URL: https://github.com/apache/pulsar-client-go/pull/507#issuecomment-818072313
> > IIUC, the TopicMetadata gives us the number of partitions at the time the MessageRouter is invoked. For our use case, we need to keep recording the number of partitions when a new partition key is defined. > > I'm not convinced exposing `NumPartitions()` would help here. All the custom logic should be possible to implement within a custom message router. > > In any case, there's already a way to get the partitions for a topic, by using `Client.TopicPartitions()` ~~ACK, I didn't realize there is a method already. That should work. I removed changes related to `NumPartitions()`~~ As Denis commented in [this MR](https://cd.splunkdev.com/data-availability/go-ingest-lib/-/merge_requests/182#note_5331041), there could be concerns if we hit brokers often. What do you think? -- 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. For queries about this service, please contact Infrastructure at: [email protected]
