One issue to consider is timezones thought. Tumbling windows align at
timetamp zero, but zero is the start of the day in UTC only. If you are
in a different timezone, you would need to "shift" the timestamps
accordingly.

For example, you can shift them using a custom TimestampExtractor, or
you use the Processor API and modify the timestamp via
`context.forward(..., To.all().withTimestamp(...))`.


-Matthias

On 10/23/19 8:06 PM, Boyang Chen wrote:
> Hey Zongzhen,
> 
> I have implemented some similar functionality with KStream before. You
> could just set tumbling window to 24 hours to get daily aggregation result.
> As you just need calendar dates, the tumbling window computation starts
> from system time 0 which is exactly cut-off daily.
> 
> Boyang
> 
> On Wed, Oct 23, 2019 at 7:21 PM 董宗桢 <jackdongd...@126.com> wrote:
> 
>> Hello,
>>
>>
>> I wanna run Kafka Streams on my system to aggregate the users' sales order
>> transactions based on "daily".
>> I know that Kafka Streams provides such mechanisms called tumbling window,
>> but it seems to be just setting an interval to run the aggregation
>> function. What I want is to aggregate by calendar date, which means, for
>> example, from 10.23 00:00 AM to 10.24 00:00AM, kind of a scheduler which
>> runs every day at 00:00AM to count all my transactions that happened last
>> day.
>>
>>
>> Is there any functionality in Kafka streams that I can use out of the box
>> to implement my requirement?
>>
>>
>> Thanks
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to