i am consuming from mqtt through camel and trying to publish to confluent kafka, but when i produce to kafka i get the following error
java.lang.IllegalArgumentException: Login module control flag is not available in the JAAS config
at org.apache.kafka.common.security.JaasConfig.loginModuleControlFlag(JaasConfig.java:85) ~[kafka-clients-3.1.1.jar:na]
at org.apache.kafka.common.security.JaasConfig.parseAppConfigurationEntry(JaasConfig.java:111) ~[kafka-clients-3.1.1.jar:na]
my camel config for building route uri looks like this
builder.setScheme("kafka");
builder.setHost(topicName);
builder.setParameter("brokers",broker);
builder.setParameter("saslMechanism","PLAIN");
builder.setParameter("securityProtocol","SASL_SSL");
builder.setParameter("saslJaasConfig", "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"username\" password=\"Password\";");
i followed this link Camel-Kafka security protocol SASL_SASL not working tried to put JAAS config in RAW but it doesn't work, even i tried to externalize the jaas property as mentioned here Kafka "Login module not specified in JAAS config" but still i am getting the same error not sure what is missing in jaas config or its a problem with camel kafka dependency
i am using following dependency chart camel version 2.25.4
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-mqtt</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring-boot</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-kafka</artifactId>
<version>${camel.version}</version>
</dependency>
</dependencies>
i have been stuck figuring out, any help?