Description
The KafkaConsumer documentation says the following about the security_protocol setting:
security_protocol (str) – Protocol used to communicate with brokers. Valid values are: PLAINTEXT, SSL. Default: PLAINTEXT.
This indicates that there are only 2 valid values for security_protocol: PLAINTEXT and SSL.
However, further down in the same document, when talking about the sasl_mechanism setting, it says the following:
sasl_mechanism (str) – Authentication mechanism when security_protocol is configured for SASL_PLAINTEXT or SASL_SSL. Valid values are: PLAIN, GSSAPI, OAUTHBEARER.
This clearly implies that there are actually 2 more valid values for security_protocol, that are not mentioned above: SASL_PLAINTEXT and SASL_SSL.
This is confirmed by looking at the corresponding security_protocol section of the KafkaProducer documentation, which correctly lists all 4 valid values:
security_protocol (str) – Protocol used to communicate with brokers. Valid values are: PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL. Default: PLAINTEXT.