The Kafka protocol is fairly simple, there are only six client requests APIs.
Metadata - Describes the currently available brokers, their host and port information, and gives information about which broker hosts which partitions.获得活着的broker,他们的host和port,broker包含的partition
Send - Send messages to a broker 发送消息到broker
Fetch - Fetch messages from a broker, one which fetches data, one which gets cluster metadata, and one which gets offset information about a topic. 从broker上获得消息,集群元数据和topic的offset
Offsets - Get information about the available offsets for a given topic partition.获得topic的partition的offset
Offset Commit - Commit a set of offsets for a consumer group 写入consumer group消费的offset
Offset Fetch - Fetch a set of offsets for a consumer group 读取consumer group消费的offset