4.4.3 Testing Kafka Configuration

Perform the following procedure to test the Kafka configuration:

Note:

The examples shown in this section display port number, URL, and request for illustrative purposes only. You must enter the correct values for the port number, URL and request as it exists in your application.
  1. Use the following command to stop all Tomcat servers:
    ss -tanp | grep 9092
    Output: LISTEN	0	50	:::9092
    :::*	users:(("java",31114,554)) ps –eaf | grep	31114
    kill 
    

    Note:

    9092 is the port number of the URL.
  2. Use the following command to stop all Kafka servers:
    ps -eaf | grep kafka

    Note:

    CTRL+C will kill all kafka related process.
  3. Open four putty sessions, one each for zookeeper, server, producer and consumer. Enter the following commands in the respective sessions after changing the path to kafka:
    • Zookeeper session: bin/zookeeper-server-start.sh config/zookeeper.properties
    • Server session: bin/kafka-server-start.sh config/server.properties
    • Producer session: bin/kafka-console-producer.sh --broker-list whf00bfk.in.oracle.com:9092 --topic IPERT.t
    • Consumer session: bin/kafka-console-consumer.sh --bootstrap-server whf00bfk.in.oracle.com:9092 --topic IPERESPONSE.t
  4. Start Tomcat.
  5. Enter the following request in the producer window in a single line:
    "eg:	{ ""type"" : ""DIM_ACCOUNT"",""domain"" : ""FRA"",""appId"" :
    ""OFS_IPE"",""runtype"" : 1,""runParam"" : 1,""attributes"" :
    {""Account Skey"" : ""500"",""Account Description"" : ""ASD""
    },""additionalParams"" : { }} "
    
  6. Check for the results in the Consumer window.
  7. Check for results in rti_eval_assmnt_result and rti_assmnt_result.