Last active
June 27, 2018 16:56
-
-
Save miguno/7c43c9a55a9c0a99484ff7fb773107e5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code of your Java application that uses the Kafka Streams library | |
Properties settings = new Properties(); | |
settings.put(StreamsConfig.APPLICATION_ID_CONFIG, "secure-kafka-streams-app"); | |
settings.put(StreamsConfig.BOOTSTRAP_SERVERS_CONFIG, "kafka.example.com:9093"); | |
// ...further non-security related settings may follow here... | |
settings.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, "SSL"); | |
settings.put(SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG, "/etc/security/tls/kafka.client.truststore.jks"); | |
settings.put(SslConfigs.SSL_TRUSTSTORE_PASSWORD_CONFIG, "test1234"); | |
settings.put(SslConfigs.SSL_KEYSTORE_LOCATION_CONFIG, "/etc/security/tls/kafka.client.keystore.jks"); | |
settings.put(SslConfigs.SSL_KEYSTORE_PASSWORD_CONFIG, "test1234"); | |
settings.put(SslConfigs.SSL_KEY_PASSWORD_CONFIG, "test1234"); | |
StreamsConfig streamsConfiguration = new StreamsConfig(settings); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment