kafka-tutorials icon indicating copy to clipboard operation
kafka-tutorials copied to clipboard

Ksql example to count messages is irritating

Open simon-an opened this issue 3 years ago • 0 comments

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;

image

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

simon-an avatar Feb 18 '22 12:02 simon-an