View Source KlifeProtocol.Header (Klife Protocol v0.7.0)

Kafka protocol header

Link to this section Summary

Functions

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

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

Link to this section Functions

Link to this function

deserialize_response(data, version)

View Source

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

Response content fields:

  • correlation_id: The correlation ID of this response. (int32 | versions 0+)

Link to this function

serialize_request(data, version)

View Source

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

Input content fields:

  • request_api_key: The API key of this request. (int16 | versions 0+)

  • request_api_version: The API version of this request. (int16 | versions 0+)

  • correlation_id: The correlation ID of this request. (int32 | versions 0+)

  • client_id: The client ID string. (string | versions 1+)