This article shows how to configure Apache Kafka connector (Mule 4) to use SASL_SSL security protocol with PLAIN mechanism. This article is applicable for Kafka connector versions 3.0.6 to 3.0.10.
<kafka:kafka-producer-config name="Apache_Kafka_Producer_configuration" doc:name="Apache Kafka Producer configuration" doc:id="340cf8ea-febd-486c-9b1f-37c6a1647bcf" > <kafka:ssl-kafka-producer-connection bootstrapServers="mykafka01.kafkanet:19091" keyStorePassword="changeit" keyStoreLocation="kafka.producer.keystore.jks" trustStorePassword="changeit" trustStoreLocation="kafka.producer.truststore.jks" > <kafka:additional-properties > <kafka:additional-property key="security.protocol" value="SASL_SSL" /> <kafka:additional-property key="sasl.mechanism" value="PLAIN" /> <kafka:additional-property key="sasl.jaas.config" value='org.apache.kafka.common.security.plain.PlainLoginModule required username="test-client" password="test-secret";' /> </kafka:additional-properties> </kafka:ssl-kafka-producer-connection> </kafka:kafka-producer-config> <kafka:kafka-consumer-config name="Apache_Kafka_Consumer_configuration" doc:name="Apache Kafka Consumer configuration" doc:id="84482921-a5fd-48f1-b2e5-c8e6d31593ce" > <kafka:ssl-kafka-consumer-connection groupId="test-consumer" bootstrapServers="mykafka01.kafkanet:19091" keyStorePassword="changeit" keyStoreLocation="kafka.consumer.keystore.jks" trustStorePassword="changeit" trustStoreLocation="kafka.consumer.truststore.jks" > <kafka:additional-properties > <kafka:additional-property key="sasl.mechanism" value="PLAIN" /> <kafka:additional-property key="security.protocol" value="SASL_SSL" /> <kafka:additional-property key="sasl.jaas.config" value='org.apache.kafka.common.security.plain.PlainLoginModule required username="test-client" password="test-secret";' /> </kafka:additional-properties> </kafka:ssl-kafka-consumer-connection> </kafka:kafka-consumer-config>
001117204

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.