Class KafkaProxyExceptionMapper

java.lang.Object
io.kroxylicious.proxy.internal.KafkaProxyExceptionMapper

public class KafkaProxyExceptionMapper extends Object
In the operation of the proxy there are various exceptions which are "anticipated" but not necessarily handled directly. SSL Handshake errors are an illustrative example, where they are thrown and propagate through the netty channel without being handled.

The exception mapper provides a mechanism to register specific exceptions with function to evaluate them and if appropriate generate a message to respond to the client with.

  • Method Details

    • errorResponseMessage

      public static org.apache.kafka.common.protocol.ApiMessage errorResponseMessage(DecodedRequestFrame<?> frame, Throwable error)
    • errorResponseForMessage

      public static org.apache.kafka.common.requests.AbstractResponse errorResponseForMessage(org.apache.kafka.common.message.RequestHeaderData requestHeaders, org.apache.kafka.common.protocol.ApiMessage message, org.apache.kafka.common.errors.ApiException apiException)