How to add below configuration snippet into your client code<SCALA> to connect to this Confluent Cloud Kafka cluster

Required connection configs for Kafka producer, consumer, and admin

bootstrap.servers=pkc-ymrq7.us-east-2.aws.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 higher availability in Apache Kafka clients prior to 3.0

session.timeout.ms=45000

Best practice for Kafka producer to prevent data loss

acks=all

Hi @AbdulFaheem . Welcome to the Community forum!
You add it to your producer properties. I can help you with Java (not Scala):

        Properties props = new Properties();
        props.put("bootstrap.servers", "pkc-ymrq7.us-east-2.aws.confluent.cloud:9092");
etc...
        KafkaProducer<Integer, String> producer = new KafkaProducer<>(props);