-
Notifications
You must be signed in to change notification settings - Fork 131
Description
Hello,
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.