简体   繁体   中英

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.

在此处输入图片说明

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.

在此处输入图片说明

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM