Kayrock.TxnOffsetCommit.V1.Request (kayrock v1.0.1)

Copy Markdown View Source

Kayrock-generated request struct for Kafka txn_offset_commit v1 API messages

The schema of this API is

[
  transactional_id: :string,
  group_id: :string,
  producer_id: :int64,
  producer_epoch: :int16,
  topics: {:array,
   [
     name: :string,
     partitions: {:array,
      [
        partition_index: :int32,
        committed_offset: :int64,
        committed_metadata: :nullable_string
      ]}
   ]}
]

Summary

Types

t()

Request struct for the Kafka txn_offset_commit API v1

Functions

Returns the Kafka API key for this API

Returns the API version (1) implemented by this module

Returns a function that can be used to deserialize the wire response from the broker for this message type

Returns the schema of this message

Serialize a message to binary data for transfer to a Kafka broker

Types

t()

@type t() :: %Kayrock.TxnOffsetCommit.V1.Request{
  client_id: nil | binary(),
  correlation_id: nil | integer(),
  group_id: nil | binary(),
  producer_epoch: nil | integer(),
  producer_id: nil | integer(),
  topics: [
    %{
      name: nil | binary(),
      partitions: [
        %{
          partition_index: nil | integer(),
          committed_offset: nil | integer(),
          committed_metadata: nil | binary()
        }
      ]
    }
  ],
  transactional_id: nil | binary()
}

Request struct for the Kafka txn_offset_commit API v1

Functions

api_key()

@spec api_key() :: integer()

Returns the Kafka API key for this API

api_vsn()

@spec api_vsn() :: integer()

Returns the API version (1) implemented by this module

response_deserializer()

@spec response_deserializer() :: (binary() ->
                              {Kayrock.TxnOffsetCommit.V1.Response.t(),
                               binary()})

Returns a function that can be used to deserialize the wire response from the broker for this message type

schema()

@spec schema() :: term()

Returns the schema of this message

See above.

serialize(struct)

@spec serialize(t()) :: iodata()

Serialize a message to binary data for transfer to a Kafka broker