You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "VaishnaviR18 (via GitHub)" <gi...@apache.org> on 2023/07/07 05:18:34 UTC

[GitHub] [camel] VaishnaviR18 commented on a diff in pull request #10555: [CAMEL-19412] - camel-kafka - Add kerberos config file location prope…

VaishnaviR18 commented on code in PR #10555:
URL: https://github.com/apache/camel/pull/10555#discussion_r1255255005


##########
components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaFetchRecords.java:
##########
@@ -244,6 +244,9 @@ protected void createConsumer() {
             // this may throw an exception if something is wrong with kafka consumer
             this.consumer = kafkaConsumer.getEndpoint().getKafkaClientFactory().getConsumer(kafkaProps);
 
+            var krbLocation = kafkaConsumer.getEndpoint().getConfiguration().getKerberosConfigLocation();
+            System.setProperty("java.security.krb5.conf", krbLocation);

Review Comment:
   @davsclaus Yes correct, missed that point. Thanks!
   As there is no default location, can we update the code like this?
   var krbLocation = kafkaConsumer.getEndpoint().getConfiguration().getKerberosConfigLocation();
   if (krbLocation != null) {
             System.setProperty("java.security.krb5.conf", krbLocation);
   }



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org