Unit Testing Event Publication and Subscription

After you configure Kafka, you need to do preliminary tests to check if the configurations are correct. Sidecar APIs implement consumer and producer application, but Kafka installations also come with simple Consumer and Producer console (command line/shell) applications. You can configure consumer.properties and producer.properties file in Kafka installation, start necessary topics, send a request in the producer console and verify that it appears in the consumer console apps. These tests can ensure that various configurations (for example, SSL configurations) in Kafka and Siebel CRM are correct.

To Test Kafka producer and consumer console test apps

The following changes are to be made in consumer.properties and producer.properties of Kafka for testing communication over SSL:

security.protocol=SSL
ssl.keystore.location=<Fully qualified Siebel Keystore file location>
ssl.keystore.password=<pwd value>
ssl.truststore.location=< Fully qualified Siebel Truststore file location>
ssl.truststore.password=<pwd value>
ssl.key.password=<pwd value>

Sample Windows command to start the Kafka consumer console app from Kafka bin directory:

kafka-console-consumer.bat --topic <name of topic> --bootstrap-server 
<fully qualified Kafka server hostname>:9093 --consumer.config 
"D:\kafka\config\consumer.properties"

Similarly, to start the Kafka producer console app from Kafka bin directory:

kafka-console-producer.bat --topic <name of topic> --bootstrap-server 
<fully qualified Kafka server hostname>:9093 --producer.config 
"D:\kafka\config\producer.properties"