Package io.kroxylicious.proxy.config
Class SniHostIdentifiesNodeIdentificationStrategy
java.lang.Object
io.kroxylicious.proxy.config.SniHostIdentifiesNodeIdentificationStrategy
- All Implemented Interfaces:
NodeIdentificationStrategyFactory
public class SniHostIdentifiesNodeIdentificationStrategy
extends Object
implements NodeIdentificationStrategyFactory
A NodeIdentificationStrategy implementation that binds to a single, shared, port for bootstrap and
all brokers. SNI information is used to route the connection to the correct target.
The following configuration is required:
The following configuration is required:
bootstrapAddressaHostPortdefining the host and port of the bootstrap address.- $
advertisedBrokerAddressPatternmust be set. This property contains an address pattern used to advertise broker addresses. It is addresses made from this pattern that are returned to the kafka client in the Metadata response so must be resolvable by the client. Optionally these properties can specify a port which will be advertised to the clients. Two patterns ar supported:$(nodeId)- which interpolates the node id into the address.$(virtualClusterName)- which interpolates the virtual cluster name into the address.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Constructor Summary
ConstructorsConstructorDescriptionSniHostIdentifiesNodeIdentificationStrategy(String bootstrapAddress, String advertisedBrokerAddressPattern) -
Method Summary
Modifier and TypeMethodDescriptionbuildStrategy(String clusterName) booleanintintinthashCode()toString()
-
Constructor Details
-
SniHostIdentifiesNodeIdentificationStrategy
-
-
Method Details
-
getBootstrapAddressPattern
-
getAdvertisedPort
public int getAdvertisedPort() -
getBootstrapPort
public int getBootstrapPort() -
getBootstrapAddress
-
getAdvertisedBrokerAddressPattern
-
equals
-
hashCode
public int hashCode() -
toString
-
buildStrategy
- Specified by:
buildStrategyin interfaceNodeIdentificationStrategyFactory
-