access a kafka topic with kafka-console-consumer

Create the configuration file

Create a file consumer.properties with:

ssl.truststore.type=PEM
ssl.truststore.location=<certificat path>.crt
security.protocol=SASL_SSL
sasl.mechanism=SCRAM-SHA-512
sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="<user>" password="<password>";

Connect to the topic:

/usr/local/kafka/kafka_2.13-3.6.2/bin/kafka-console-consumer.sh --bootstrap-server <bootstrap-url> --consumer.config consumer.properties --topic <topic name>



    Enjoy Reading This Article?

    Here are some more articles you might like to read next:

  • KafkaConnect Oracle configuration
  • How to create an Oracle DB link ?
  • KafkaConnect PostgreSQL configuration
  • KafkaConnect SQL Server configuration
  • KafkaConnect MariaDB configuration