Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.43 KB

kafka-common-requests-AbstractRequestResponse.adoc

File metadata and controls

40 lines (28 loc) · 1.43 KB

AbstractRequestResponse Contract

AbstractRequestResponse is the abstraction of messages exchanged between Kafka clients and brokers.

Note
AbstractRequestResponse is a Java abstract class and cannot be created directly. It is created indirectly for the concrete AbstractRequestResponses.

AbstractRequestResponse defines the single serialize static method.

ByteBuffer serialize(Struct headerStruct, Struct bodyStruct)

serialize simply allocates a new java.nio.ByteBuffer for the given header and body structs followed by writing them out to the buffer (and rewinding the buffer).

serialize is used when AbstractRequest and AbstractResponse are requested to serialize.

Table 1. AbstractRequestResponses (Direct Extensions and Implementations)
AbstractRequestResponse Description

AbstractRequest

AbstractResponse

RequestHeader

ResponseHeader