Kafka Consumer Test Example
Example consumer configuration using the Kafka client tools. Update the identified <variables> accordingly.
Prerequisites:
- valid client cert w/pkey
- pkey password/passphrase
Example configuration steps:
- Create certfile with client cert: cert.pem
- Create key file: key.pem
- Create PKCS12 from pem files: openssl pkcs12 -export -in cert.pem -inkey key.pem -name <cert DN> -out <filename>.p12
- Create keystore using PKCS12 file: keytool -importkeystore -deststorepass <store password> -destkeystore kafka.client.keystore.jks -srckeystore <filename>.p12 -srcstoretype PKCS12
- Copy Java truststore file to same dir as keystore: cp /usr/lib/jvm/java-<version>/jre/lib/security/cacerts kafka.client.truststore.jks
- Copy and edit Kafka consumer.properties file:
- group.id=<consumer group>
- security.protocol=SSL
- ssl.truststore.location=kafka.client.truststore.jks
- ssl.keystore.location=kafka.client.keystore.jks
- ssl.keystore.password=<store password>
- ssl.key.password=<key password>
Update local hosts file with all broker FQDNS & IP addresses for correct name resolution (if external)
Run Kafka consumer command to confirm connectivity: bin/kafka-console-consumer.sh --bootstrap-server <broker FQDN>:9094 --consumer.config config/consumer.properties --topic <topic> --max-messages 10
Completion of the above steps will enable streaming of the requested data feed from the Cboe Global Cloud.





