kafka-tutorials
kafka-tutorials copied to clipboard
Ksql example to count messages is irritating
The example uses limit 1 which will give a random massage count, since the query is NOT processing all message. Without limit 1, after some second one have the correct count.
SELECT 'X' AS X, COUNT(*) AS MSG_CT FROM TOPIC GROUP BY 'X' EMIT CHANGES LIMIT 1;

Can anyone explain, why the behavior is diffrent to whats describe in the example?