In Apache Kafka Documentation they use keyword PLAINTEXT as a protocol in many default settings:
e.g.
listeners=PLAINTEXT://broker1:9091,SSL://broker1:9092
Does it represent just a default non-SSL protocol and if so, why they use PLAINTEXT keyword for that?
It dictates how the Kafka tool runs in the JAAS configuration. These are some security rules and regulations used while exchanging words with the servers. It indicates the size of the memory buffer which will hold the data to be sent to the producer.
PLAIN, or SASL/PLAIN, is a simple username/password authentication mechanism that is typically used with TLS for encryption to implement secure authentication. Apache Kafka® supports a default implementation for SASL/PLAIN, which can be extended for production use.
The Kafka Listener is work on the publish and subscribe model. The Apache Kafka is nothing but a massaging protocol. The Kafka broker will receive the number of messages by the Kafka topics. We need to set the listener configuration correctly.
Producers are the publisher of messages to one or more Kafka topics. Producers send data to Kafka brokers.
The docs for listeners
states:
Comma-separated list of URIs we will listen on and the listener names. If the listener name is not a security protocol, listener.security.protocol.map must also be set.
So PLAINTEXT
in your example is the security protocol used on the listener. You can find the list of supported protocols and their respective meanings in the SecurityProtocol Javadocs.
PLAINTEXT
means the listener will be without authentication and non-encrypted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With