Class PortIdentifiesNodeIdentificationStrategy

java.lang.Object
io.kroxylicious.proxy.config.PortIdentifiesNodeIdentificationStrategy
All Implemented Interfaces:
NodeIdentificationStrategyFactory

public class PortIdentifiesNodeIdentificationStrategy extends Object implements NodeIdentificationStrategyFactory
A NodeIdentificationStrategy implementation that uses a separate port per broker endpoint and that is aware of distinct ranges of nodeIds present in the target cluster. Upstream nodeIds are mapped to a compact set of ports.
The following configuration is supported:
  • bootstrapAddress (required) a HostPort defining the host and port of the bootstrap address.
  • brokerAddressPattern (optional) an address pattern used to form 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. One pattern is supported: $(nodeId) which interpolates the node id into the address. If brokerAddressPattern is omitted, it defaulted it based on the host name of bootstrapAddress.
  • brokerStartPort (optional) defines the starting range of port number that will be assigned to the brokers. If omitted, it is defaulted to the port number of bootstrapAddress + 1.
  • nodeIdRanges (required) defines the node id ranges present in the target cluster