0
votes

Hi i have Left Join Ksql Stream ( SEARCHREQUESTDTO) with a Ksql Table (NGINX_TABLE). with following ksql command

CREATE STREAM NIGINX_SEARCH_QUERY AS \
  SELECT  *\
  FROM SEARCHREQUESTDTO\
  LEFT JOIN NGINX_TABLE\
    ON SEARCHREQUESTDTO.sessionid = NGINX_TABLE.sessionid;

Resulting Stream NIGINX_SEARCH_QUERY successfully. also i can see NIGINX_SEARCH_QUERY topic using show topic command in Ksql terminal.

enter image description here

when i try to connect kafka consumer to this topic consumer is not able to fetch any data.

but print NIGINX_SEARCH_QUERY command showing data is publishing in this topic.

enter image description here

1
Have you tried to do CREATE STREAM ... WITH (kafka_topic='...')?OneCricketeer
Please don't post screenshots, it makes it harder to follow your question. Copy and paste the text into your question and use code formatting.Robin Moffatt

1 Answers

2
votes

If PRINT shows output then the topic does exist and has data.

If your consumer doesn't show output then that's an error with your consumer. So I would rephrase your question as, I have a Kafka topic that my Consumer does not show data for.

I would use kafkacat to check the topic externally:

      kafkacat -b kafka-broker:9092 -C -K: \
      -f '\nKey (%K bytes): %k\t\nValue (%S bytes): %s\n\Partition: %p\tOffset: %o\n--\n' \
      -t NIGINX_SEARCH_QUERY