美文网首页Apache Kafka
how to write a kafka client?----

how to write a kafka client?----

作者: loinliao | 来源:发表于2018-01-04 15:43 被阅读5次

    官方文档

    • 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.

    1. Cycle through a list of "bootstrap" kafka urls until we find one we can connect to. Fetch cluster metadata.
    2. Process fetch or produce requests, directing them to the appropriate broker based on the topic/partitions they send to or fetch from.
    3. If we get an appropriate error, refresh the metadata and try again.

    相关文章

      网友评论

        本文标题:how to write a kafka client?----

        本文链接:https://www.haomeiwen.com/subject/pzmrnxtx.html