View Source KlifeProtocol.Messages.ShareFetch (Klife Protocol v0.9.0)

Kafka protocol ShareFetch message

Request versions summary:

Response versions summary:

Link to this section Summary

Functions

Returns the message api key number.

Receive a binary in the kafka wire format and deserialize it into a map.

Returns the current max supported version of this message.

Returns the current min supported version of this message.

Receives a map and serialize it to kafka wire format of the given version.

Link to this section Functions

Returns the message api key number.

Link to this function

deserialize_response(data, version, with_header? \\ true)

View Source

Receive a binary in the kafka wire format and deserialize it into a map.

Response content fields:

  • throttle_time_ms: The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota. (int32 | versions 0+)

  • error_code: The top-level response error code. (int16 | versions 0+)

  • error_message: The top-level error message, or null if there was no error. (string | versions 0+)

  • responses: The response topics. ([]ShareFetchableTopicResponse | versions 0+)

    • topic_id: The unique topic ID. (uuid | versions 0+)

    • partitions: The topic partitions. ([]PartitionData | versions 0+)

      • partition_index: The partition index. (int32 | versions 0+)

      • error_code: The fetch error code, or 0 if there was no fetch error. (int16 | versions 0+)

      • error_message: The fetch error message, or null if there was no fetch error. (string | versions 0+)

      • acknowledge_error_code: The acknowledge error code, or 0 if there was no acknowledge error. (int16 | versions 0+)

      • acknowledge_error_message: The acknowledge error message, or null if there was no acknowledge error. (string | versions 0+)

      • current_leader: The current leader of the partition. (LeaderIdAndEpoch | versions 0+)

        • leader_id: The ID of the current leader or -1 if the leader is unknown. (int32 | versions 0+)

        • leader_epoch: The latest known leader epoch. (int32 | versions 0+)

      • records: The record data. (records | versions 0+)

      • acquired_records: The acquired records. ([]AcquiredRecords | versions 0+)

        • first_offset: The earliest offset in this batch of acquired records. (int64 | versions 0+)

        • last_offset: The last offset of this batch of acquired records. (int64 | versions 0+)

        • delivery_count: The delivery count of this batch of acquired records. (int16 | versions 0+)

  • node_endpoints: Endpoints for all current leaders enumerated in PartitionData with error NOT_LEADER_OR_FOLLOWER. ([]NodeEndpoint | versions 0+)

    • node_id: The ID of the associated node. (int32 | versions 0+)

    • host: The node's hostname. (string | versions 0+)

    • port: The node's port. (int32 | versions 0+)

    • rack: The rack of the node, or null if it has not been assigned to a rack. (string | versions 0+)

Returns the current max supported version of this message.

Returns the current min supported version of this message.

Link to this function

request_schema(unkown_version)

View Source
Link to this function

response_schema(unkown_version)

View Source
Link to this function

serialize_request(map, version)

View Source

Receives a map and serialize it to kafka wire format of the given version.

Input content fields:

  • group_id: The group identifier. (string | versions 0+)

  • member_id: The member ID. (string | versions 0+)

  • share_session_epoch: The current share session epoch: 0 to open a share session; -1 to close it; otherwise increments for consecutive requests. (int32 | versions 0+)

  • max_wait_ms: The maximum time in milliseconds to wait for the response. (int32 | versions 0+)

  • min_bytes: The minimum bytes to accumulate in the response. (int32 | versions 0+)

  • max_bytes: The maximum bytes to fetch. See KIP-74 for cases where this limit may not be honored. (int32 | versions 0+)

  • topics: The topics to fetch. ([]FetchTopic | versions 0+)

    • topic_id: The unique topic ID. (uuid | versions 0+)

    • partitions: The partitions to fetch. ([]FetchPartition | versions 0+)

      • partition_index: The partition index. (int32 | versions 0+)

      • partition_max_bytes: The maximum bytes to fetch from this partition. 0 when only acknowledgement with no fetching is required. See KIP-74 for cases where this limit may not be honored. (int32 | versions 0+)

      • acknowledgement_batches: Record batches to acknowledge. ([]AcknowledgementBatch | versions 0+)

        • first_offset: First offset of batch of records to acknowledge. (int64 | versions 0+)

        • last_offset: Last offset (inclusive) of batch of records to acknowledge. (int64 | versions 0+)

        • acknowledge_types: Array of acknowledge types - 0:Gap,1:Accept,2:Release,3:Reject. ([]int8 | versions 0+)

  • forgotten_topics_data: The partitions to remove from this share session. ([]ForgottenTopic | versions 0+)

    • topic_id: The unique topic ID. (uuid | versions 0+)

    • partitions: The partitions indexes to forget. ([]int32 | versions 0+)