Window Suppress() funcationality in KSQLDB

Hi,

I want to achieve same functionality of suppress() method i.e. one output per window, how can I achieve it in KSQLDB.

Please help me with this.

Thanks.

You can use EMIT FINAL (instead of EMIT CHANGES) to enable “suppress” – note that EMIT FINAL is not supported on Confluent Cloud.

The problem with EMIT FINAL is, that the underlying suppress() uses an in-memory state store and thus it’s hard to control the memory usage, and it’s considered “unsafe”; your query could crash with an out-of-memory-error.

We are currently working on an improved implementation for the “suppress” feature in Kafka Streams (cf KIP-825: introduce a new API to control when aggregated results are produced - Apache Kafka - Apache Software Foundation) that will allow us to make EMIT FINAL a stable feature.

Update: EMIT FINAL is now also available in CCloud.

2 Likes

Hey thank you so much. That helped alot.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.