Reputation: 125
I need to connect Lagom 1.6/Java/Sbt application to Confluent Cloud Kafka cluster. From Confluent I have the following configuration:
bootstrap.servers=xxxx.us-west1.gcp.confluent.cloud:9092
security.protocol=SASL_SSL
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username='{{ CLUSTER_API_KEY }}' password='{{ CLUSTER_API_SECRET }}';
sasl.mechanism=PLAIN
# Required for correctness in Apache Kafka clients prior to 2.6
client.dns.lookup=use_all_dns_ips
# Best practice for Kafka producer to prevent data loss
acks=all
Where and how would I configure it in Lagom?
Upvotes: 0
Views: 187
Reputation: 125
I did manage to connect with the following configuration in my application.conf (thanks @Robin Moffatt).
lagom.broker.kafka.service-name = ""
lagom.broker.kafka.brokers = "xxxx.us-west1.gcp.confluent.cloud:9092"
akka.kafka.consumer.kafka-clients {
bootstrap.servers="xxxx.us-west1.gcp.confluent.cloud:9092"
security.protocol="SASL_SSL"
sasl.jaas.config="org.apache.kafka.common.security.plain.PlainLoginModule required username='API_KEY' password='API_SECRET';"
sasl.mechanism="PLAIN"
client.dns.lookup="use_all_dns_ips"
}
akka.kafka.producer.kafka-clients {
bootstrap.servers="xxxx.us-west1.gcp.confluent.cloud:9092"
security.protocol="SASL_SSL"
sasl.jaas.config="org.apache.kafka.common.security.plain.PlainLoginModule required username='API_KEY' password='API_SECRET';"
sasl.mechanism="PLAIN"
client.dns.lookup="use_all_dns_ips"
}
Upvotes: 2