I'm trying to connect my spring-boot application with multiple kafka resources which has different sicurity configurations. First kafka source has default PLAINTEXT security protocol, while the second source has SASL_PLAINTEXT.
So I need to configure multiple consumers:
- for kafka instance with PLAINTEXT protocol
- for kafka instance with SASL_PLAINTEXT protocol and
sasl.mechanism
&sasl.jaas.config
Is there any whay to achive this wia java confguration? I've found sutable config classes https://kafka.apache.org/24/javadoc/org/apache/kafka/common/config/SaslConfigs.html https://kafka.apache.org/24/javadoc/org/apache/kafka/clients/admin/AdminClientConfig.html
but I have no idea how to use it for multiple kafka source configuration.
Thanks for help.