Embedded Kafka always uses plaintext for communicating to brokers
See original GitHub issueHi,
I posted this issue on stack overflow creating an embedded SASL_SSL enabled kafka. It appears that right now, the Embedded kafka is designed to only ever use the plaintext protocol for it’s broker communication. This might not always be the case, depending on how people might want to set up their test environment. It can be fixed by something like below:
if (this.kafkaPorts[i] == 0) {
this.kafkaPorts[i] = TestUtils.boundPort(server, SecurityProperties.forName(this.brokerProperties.getOrDefault("security.protocol", SecurityProtocol.PLAINTEXT).toString()); // or whatever property provides security protocol I should be using to communicate.
}
as opposed to
if (this.kafkaPorts[i] == 0) {
this.kafkaPorts[i] = TestUtils.boundPort(server, SecurityProtocol.PLAINTEXT);
}
in EmbeddedKafkaBroker.java
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
SASL_SSL integration with EmbeddedKafka - Stack Overflow
The embedded kafka is configured to only use PLAINTEXT protocol to communicate to the broker. 2.) Zookeeper options are not configurable ...
Read more >Configuring PLAIN - Confluent Documentation
If you want to enable SASL for interbroker communication, add the following to the broker properties file (it defaults to PLAINTEXT ). Set...
Read more >Testing Kafka and Spring Boot - Baeldung
First, we'll start by looking at how to use and configure an embedded instance of Kafka. Then we'll see how we can make...
Read more >Documentation - Apache Kafka
The ConsoleProducer no longer supports the Scala producer, it always uses the Java ... Kafka Streams is more robust against broker communication errors....
Read more >When NOT to use Apache Kafka? - Kai Waehner
The edge is here to stay and grow. Some use cases require the deployment of a Kafka cluster or single broker outside a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@rgmprabodha We have no intention to add SSL etc to the embedded broker - it is only intended for integration testing so there is no real value in adding the complexity.
If you absolutely need it, consider using TestContainers instead.
Do you have any updates on this?