Package io.kroxylicious.proxy.filter
Interface ProduceResponseFilter
- All Superinterfaces:
Filter
A stateless filter for ProduceResponses.
-
Method Summary
Modifier and TypeMethodDescriptiononProduceResponse(short apiVersion, org.apache.kafka.common.message.ResponseHeaderData header, org.apache.kafka.common.message.ProduceResponseData response, FilterContext context) Handle the givenheaderandresponsepair, returning theheaderandresponsepair to be passed to the next filter using the ResponseFilterResult.default booleanshouldHandleProduceResponse(short apiVersion) Determine if a response message of type ProduceResponse should be handled by this filter implementation.
-
Method Details
-
shouldHandleProduceResponse
default boolean shouldHandleProduceResponse(short apiVersion) Determine if a response message of type ProduceResponse should be handled by this filter implementation. returns true thenonProduceResponseis eligible to be invoked with deserialized data, if the message reaches this filter in the chain.- Parameters:
apiVersion- the apiVersion of the message- Returns:
- true if it should be handled
-
onProduceResponse
CompletionStage<ResponseFilterResult> onProduceResponse(short apiVersion, org.apache.kafka.common.message.ResponseHeaderData header, org.apache.kafka.common.message.ProduceResponseData response, FilterContext context) Handle the givenheaderandresponsepair, returning theheaderandresponsepair to be passed to the next filter using the ResponseFilterResult.
The implementation may modify the givenheaderandresponsein-place, or instantiate a new instances.- Parameters:
apiVersion- the apiVersion of the responseheader- response header.response- The body to handle.context- The context.- Returns:
- a non-null CompletionStage that, when complete, will yield a ResponseFilterResult containing the response to be forwarded.
- See Also:
-