kafka+java+zookeeper+offset=putANDfetch.txt


立即下载 نسر الصحراء
2024-04-16
offset offsets Kafka i.e. Consumers commit ir ZooKeeper consumer Kafka-base
6.4 KB

Committing and fetching consumer offsets in KafkaSkip to end of metadataCreated by Joel Koshy, last modified on Mar 24, 2015 Go to start of metadataIn Kafka releases through 0.8.1.1, consumers commit their offsets to ZooKeeper. ZooKeeper does not scale extremely well (especially for writes) when there are a large number of offsets (i.e., consumer-count * partition-count). Fortunately, Kafka now provides an ideal mechanism for storing consumer offsets. Consumers can commit their offsets in Kafka by writing them to a durable (replicated) and highly available topic. Consumers can fetch offsets by reading from this topic (although we provide an in-memory offsets cache for faster access). i.e., offset commits are regular producer requests (which are inexpensive) and offset fetches are fast memory look ups.The official Kafka documentation describes how the feature works and how to migrate offsets from ZooKeeper to Kafka. This wiki provides sample code that shows how to use the new Kafka-base

offset/offsets/Kafka/i.e./Consumers/commit/ir/ZooKeeper/consumer/Kafka-base/ offset/offsets/Kafka/i.e./Consumers/commit/ir/ZooKeeper/consumer/Kafka-base/
-1 条回复
登录 后才能参与评论
-->