You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Oleg Zhurakousky <oz...@hortonworks.com> on 2016/02/29 17:38:29 UTC

Connecting to secure Kafka

So, my Kafka is kerberized and all works well
However when trying to connect with missing SASL properties Kafka doesn’t fail. It simply hangs indefinitely.
Here is the example code;

Properties props = new Properties();
props.put("bootstrap.servers", "ubuntu.oleg.com<http://ubuntu.oleg.com>:9095");
props.put("group.id", "securing-kafka-group");
props.put("key.deserializer", "org.apache.kafka.common.serialization.StringDeserializer");
props.put("value.deserializer", "org.apache.kafka.common.serialization.StringDeserializer");
KafkaConsumer<String, String> consumer = new KafkaConsumer<>(props);
consumer.listTopics();

So, it hangs on listTopics(). I think one would expect it to fail. Am I wrong?

Thanks
Oleg