Hi Jean,
Below is a sample Siddhi app using the external timestamp for your reference.
@App:name("ExpireOnExternalTT")
@App:description("Description of the plan")
define stream LoginEvents (timestamp long, ip string);
define window LoginWindow (timestamp long, ip string) externalTimeBatch(timestamp, 1 sec) output all events;
@info(name = 'query0')
from LoginEvents
insert into LoginWindow;
@info(name = 'query1')
from LoginWindow
select timestamp, ip, count() as total
insert all events into uniqueIps;
Furthermore, we support reordering out of order events using
siddhi-execution-reorder extension based on the K-Slack and alpha K-Stack algorithms.
Using this extension you can pre-order the events and pass the events to the window thereafter.
Please elaborate more on your use-case, so that we can provide you with a comprehensive solution.
Also, we can consider adding this support to our roadmap, if we cannot achieve the requirement from the provided approaches.