Output when SessionTimeoutWindow() ends
See original GitHub issueHello,
I have been working with Trill for an Real-time application where we need to aggregate live streaming data and output when a SessionTimeoutWindow closes. Using the syntax:
var query = inputStream
.SessionTimeoutWindow(TimeSpan.FromSeconds(30).Ticks)
.GroupAggregate(
x => x.DeviceGuid,
x => x.Min(v => DateTime.Parse(v.ReceivedTime)),
x => x.Max(v => DateTime.Parse(v.ReceivedTime)),
(key, startTime, endTime) => new { key.Key, startTime, endTime })
and registering the input as:
var inputStream = this.queryContainer.RegisterInput(
this.input,
DisorderPolicy.Adjust(),
FlushPolicy.FlushOnPunctuation,
PeriodicPunctuationPolicy.Time((ulong)TimeSpan.FromSeconds(1).Ticks),
OnCompletedPolicy.EndOfStream);
Trill is able to output whenever it receives a Punctuation and returns intermediary results whenever it receives a Punctuation. What we need instead is Trill to only return when the Session closes. I have tried various combinations to remove the dependency on Punctuations and instead register the input with other settings, but Trill doesn’t output anything in that case. Is there a way I can force Trill to output the result of the query only when the SessionTimeoutWindow closes and not the intermediate states when it receives the Punctuation? Thanks for the help.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (2 by maintainers)
Top GitHub Comments
Hi @wassim-k , We couldn’t get any answer to this question. Trill is a very good product but unfortunately lacks community support. Hence, we decided to go with Kafka Streams itself.
That worked perfectly. Thank you @peterfreiling your help so far has been invaluable for our project.