# ksqlDB delayed stream

**URL:** https://forum.confluent.io/t/ksqldb-delayed-stream/2624
**Category:** ksqlDB
**Created:** [1 September 2021 07:05 UTC](https://forum.confluent.io/t/ksqldb-delayed-stream/2624 "2021-09-01T07:05:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Santhosh](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@Santhosh](https://forum.confluent.io/u/Santhosh)
#### Post date: [1 September 2021 07:05 UTC](https://forum.confluent.io/t/ksqldb-delayed-stream/2624/1 "2021-09-01T07:05:15Z")

</div>

Is it possible to implement delayed streams in ksqlDB? For example, I have a topic called “Page\_Reads” and an event will be published on this topic whenever a page is read. I would like to create a stream with a window of 10 minutes but I want the result to be consumed only after the window is completed.

Let’s say we are talking about the window t1-t2 and within this window, a page was read 5 times. I would like to create a persistent query that will publish a message with Page Id and Read count once the window is over (Just one message per window after the window is over). Appreciate your response.

---

<div class="post-metadata">

### Author: ![mjsax](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mjsax/32/3113_2.png) [@mjsax](https://forum.confluent.io/u/mjsax)
#### Post date: [7 September 2021 16:51 UTC](https://forum.confluent.io/t/ksqldb-delayed-stream/2624/2 "2021-09-07T16:51:58Z")

</div>

You can use `EMIT FINAL` instead of `EMIT CHANGES` to do this.

---

<div class="post-metadata">

### Author: ![Santhosh](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@Santhosh](https://forum.confluent.io/u/Santhosh)
#### Post date: [8 September 2021 11:40 UTC](https://forum.confluent.io/t/ksqldb-delayed-stream/2624/3 "2021-09-08T11:40:40Z")

</div>

Thank you @mjsax. I will try it out.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)
#### Post date: [1 October 2021 07:05 UTC](https://forum.confluent.io/t/ksqldb-delayed-stream/2624/4 "2021-10-01T07:05:23Z")

</div>

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