# Delayed ksql stream queries

**URL:** https://forum.confluent.io/t/delayed-ksql-stream-queries/8504
**Category:** ksqlDB
**Created:** [15 August 2023 22:20 UTC](https://forum.confluent.io/t/delayed-ksql-stream-queries/8504 "2023-08-15T22:20:43Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![satisharas](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@satisharas](https://forum.confluent.io/u/satisharas)
#### Post date: [15 August 2023 22:20 UTC](https://forum.confluent.io/t/delayed-ksql-stream-queries/8504/1 "2023-08-15T22:20:43Z")

</div>

Hi All, I have a use case whereI have these topicsmy-topic  
my-topic-error  
my-topic-retry

I have a springboot consumer which consumes from **my-topic** and makes REST call.

- If the api fails will write to my-topic-error

I have ksqldb cluster which should read from my. **my-topic** and take the message payload, along with timestamp give 5 minutes delay (need to implement multiple retry option with time delay 5/15/30 minutes) and send message to **my-topic-retry** \*\*

I would like to understand how I can implement this solution using ksqlDB stream queries?\*\*

I have another retry springboot which consumes from **my-topic-retry and** should try calling REST endpoint and if anything fails it will be sent to **my-topic-dlq**

I am trying to achieve delayed execution of messages. Any suggestion? or this even can be achieved?

Thanks  
Satish

---

<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: [17 August 2023 15:56 UTC](https://forum.confluent.io/t/delayed-ksql-stream-queries/8504/2 "2023-08-17T15:56:57Z")

</div>

I don’t think it’s possible to implement this with ksqlDB. Maybe using Kafka Streams can help (via `Punctuations`).

---

<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: [14 September 2023 22:21 UTC](https://forum.confluent.io/t/delayed-ksql-stream-queries/8504/3 "2023-09-14T22:21:17Z")

</div>

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