You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Santhoshi Mekala <cs...@gmail.com> on 2024/04/29 08:43:42 UTC
How to find out the end of the session window
Hi Team,
We have the below requirement:
We are processing batch logs in kstreams. Currently, we are storing the
batch logs in kafka topic after processing. We would like to integrate with
object storage to store the batch logs in object storage after processing.
For batch logs, we are using Session windows. We would like to emit a
special event when the session window is closed and based on that event, we
will aggregate all the logs related to a key and will send it to the object
storage. For this, we need to know the end of the session window. Could you
please let me know if there are ways to identify the end of the session
windows and emit a special event.
Thank you!
--
Thanks & Regards,
Santhoshi M.
Re: How to find out the end of the session window
Posted by "Matthias J. Sax" <mj...@apache.org>.
Did you look into .windowedBy(...).emitStrategy(...) ?
Using emit-final you would get an downstream even only after the window
closed.
-Matthias
On 4/29/24 1:43 AM, Santhoshi Mekala wrote:
> Hi Team,
>
> We have the below requirement:
> We are processing batch logs in kstreams. Currently, we are storing the
> batch logs in kafka topic after processing. We would like to integrate with
> object storage to store the batch logs in object storage after processing.
> For batch logs, we are using Session windows. We would like to emit a
> special event when the session window is closed and based on that event, we
> will aggregate all the logs related to a key and will send it to the object
> storage. For this, we need to know the end of the session window. Could you
> please let me know if there are ways to identify the end of the session
> windows and emit a special event.
>
> Thank you!
>