-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose consistent client method set #23
Comments
The producer and consumer still make use of some private methods, but those are harder to expose consistently. This is at least a good start towards #23.
While poking around various implementations of #18 I finally figured out what I want to do with
The metadata refresh we can already force with a call to one of the public Refresh methods. The connection bounce is interesting, because I originally added this comment to the client.update method: "[if the broker hasn't changed] ignore it, replacing our existing one would just bounce the connection". However if we make the metadata refresh safely bounce connections for any broker that isn't stale we could in principle replace all "public" calls to We still have one internal call to it that would need dealing with (perhaps it just gets folded into the |
All of the methods I started this ticket for have been created (a while ago, in most cases). The only open question is broker disconnection, which is still better-tracked by #15. This can be closed. |
The
Client
object has basically no public methods right now, it is just a place to dump methods (mostly broker and metadata tracking) that are shared by the Consumer and the Producer. Its primary functions should have specific semantics defined and then be published so other people can make use of them.Probably depends on getting #15 right first...
I'm thinking (as a rough first draft):
Leader(topic, partition)
returns the broker object leading the topic/partitionTopics()
returns the list of topics for the clusterPartitions(topic)
returns the list of partitions for the topicRefreshMetadata(topics[])
Open Questions:
disconnectBroker
feels hacky, this really depends on Better Broker Connection Management #15)RefreshTopic(topic)
orRefreshAllTopics()
helper functions or something like that?any()
? It's only useful for metadata, so this probably depends if we expose all metadata or if a user might want to get it themselves.The text was updated successfully, but these errors were encountered: