Gunjesh Kant Singh
Gunjesh Kant Singh

Reputation: 11

KSQL Stream output Topic

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

Upvotes: 1

Views: 4039

Answers (1)

Robin Moffatt
Robin Moffatt

Reputation: 32140

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

Upvotes: 2

Related Questions