Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Add isControlPlane to the constructor of the processor, this value is passed in when the processor associated with the data plane and the control plane is created. "control.plane.force.controller.requests.enable" is disabled by default.The default control plane does not reject data requests, which can remain compatible when the user uses the control plane for data requests.

If control.plane.force.controller.requests.enable is true, the control plane should allow only four kinds of requests:  LeaderAndIsrRequest,UpdateMetadataRequest,StopReplicaRequest,ControlledShutdownRequest.

Code Block
languagescala
titleProcessor
class Processor(val id: Int,
                               time: Time,
                               maxRequestSize: Int,
                               requestChannel: RequestChannel,
                               connectionQuotas: ConnectionQuotas,
                               connectionsMaxIdleMs: Long,
                               failedAuthenticationDelayMs: Int,
                               listenerName: ListenerName,
                               securityProtocol: SecurityProtocol,
                               config: KafkaConfig,
                               metrics: Metrics,
                               credentialProvider: CredentialProvider,
                               memoryPool: MemoryPool,
                               logContext: LogContext,
                               connectionQueueSize: Int = ConnectionQueueSize,
                               isPrivilegedListener: Boolean = false,
                               allowDisabledApis: Boolean = false,
                               isControlPlane: Boolean = false)

...