The rekeying works fine in the following scenarios 1. Base topic to stream then rekey - Good 2. Table to stream then rekey - Good
But when trying with Table - Table join results in new table, create stream on that resulting table, then rekey stream - It appears to work fine for few minutes(select query gets the expected result), and then the data disappears from the newly created stream.
-- Table on Table join - works as expected
CREATE TABLE JOINRESULT_T AS
SELECT d.DEVICE_ID, d.LOCATION_ALIAS,d.UPDATED_BY,
d.UPDATED_TIMESTAMP AS UPDATED_TIMESTAMP, d.__DELETED AS __DELETED
FROM TABLE1 d LEFT JOIN TABLE2 l ON d.LOCATION_ALIAS=l.ALIAS;
-- Stream from table - works as expected
CREATE STREAM FROMJOIN_S WITH(KAFKA_TOPIC='JOINRESULT_T', VALUE_FORMAT='AVRO');
-- Rekey the above stream - Data disappears after few minutes
CREATE STREAM REKEY_S AS SELECT * FROM FROMJOIN_S PARTITION BY DEVICE_ID;
Describe extended command on the stream displays the count of messages the stream is currently holding. But a select command does not give out any results. The print topic command on the associated topic also does not print anything.
Ksql version : 5.3.1 , also tried latest version Partitions = 1, replicas =1.
tried to investigate if the topic storage space on kafka server is holding any data and found the log file, snapshot files both to be empty.
what could cause the data to disappear once it is written to the topic?