- Kafka uses a binary protocol over TCP.
Partitioning
Kafka clients directly control the assignment that how a particular piece of data is assigned to a particular partition.
These requests to publish or fetch data must be sent to the broker that is currently acting as the leader for a given partition.
- Cycle through a list of "bootstrap" kafka urls until we find one we can connect to. Fetch cluster metadata.
- Process fetch or produce requests, directing them to the appropriate broker based on the topic/partitions they send to or fetch from.
- If we get an appropriate error, refresh the metadata and try again.
网友评论