Class EagerMetadataLearner

java.lang.Object
io.kroxylicious.proxy.internal.filter.impl.EagerMetadataLearner
All Implemented Interfaces:
io.kroxylicious.proxy.filter.Filter, io.kroxylicious.proxy.filter.RequestFilter

public class EagerMetadataLearner extends Object implements io.kroxylicious.proxy.filter.RequestFilter
An internal filter that causes the system to eagerly learn the cluster's topology by spontaneously emitting an out-of-band Metadata request at the earliest legal point in the Kafka conversation. The response to allows the Endpoint reconciliation to take place so that restricted upstream bindings are replaced by true bindings to the actual upstream brokers.
Once the bindings are made, the filter causes the client's connection to close. This is done in order to force the client to reconnect, thus ensuring the client has a connection to the intended broker.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create EagerMetadataLearner
  • Method Summary

    Modifier and Type
    Method
    Description
    CompletionStage<io.kroxylicious.proxy.filter.RequestFilterResult>
    onRequest(org.apache.kafka.common.protocol.ApiKeys apiKey, short apiVersion, org.apache.kafka.common.message.RequestHeaderData header, org.apache.kafka.common.protocol.ApiMessage body, io.kroxylicious.proxy.filter.FilterContext context)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.kroxylicious.proxy.filter.RequestFilter

    onRequest, shouldHandleRequest
  • Constructor Details

    • EagerMetadataLearner

      public EagerMetadataLearner()
      Create EagerMetadataLearner
  • Method Details

    • onRequest

      public CompletionStage<io.kroxylicious.proxy.filter.RequestFilterResult> onRequest(org.apache.kafka.common.protocol.ApiKeys apiKey, short apiVersion, org.apache.kafka.common.message.RequestHeaderData header, org.apache.kafka.common.protocol.ApiMessage body, io.kroxylicious.proxy.filter.FilterContext context)
      Specified by:
      onRequest in interface io.kroxylicious.proxy.filter.RequestFilter