Hi Jay,

You can try something similar to this to get non-matched events during last
10 secs; You can find some documentation on this as well; link
<https://docs.wso2.com/display/CEP420/Sample+0111+-+Detecting+non-occurrences+with+Patterns>



> define stream publisher (pid string, time string);
> define stream subscriber (pid string, sid string, time string);


> from publisher#window.time(10 sec)
> select *
> insert expired events into expired_publisher;


> from every pub=publisher -> sub=subscriber[pub.pid == pid] or
> exp=expired_publisher[pub.pid == pid]
> select pub.pid as pid, pub.time as time, sub.pid as subPid
> insert into filter_stream;


> from filter_stream [(subPid is null)]
> select pid, time
> insert into not_seen_in_last_10_sec_events;


Moreover, I didn't get what you meant by "also is there a way to perform
intersection of events based on grouping or time window ?" can you please
elaborate on this?

Regards,

On Mon, Sep 25, 2017 at 11:02 AM, Jayesh Senjaliya <[email protected]>
wrote:

> Hi,
>
> is there a way to get events that didnt match within the given time frame.
>
> for example:
>
> define stream publisher (pid string, time string);
> define stream subscriber (pid string, sid string, time string);
>
> from every (e1=publisher) -> e2=subscriber[e1.pid == pid]
> within 10 sec
> select e1.pid, e2.sid
> insert into seen_in_last_10_sec_events;
>
>
> so if i have matching event above, i will see it in
> seen_in_last_10_sec_events, but is there a way to get all events or non
> matched events during that last 10 seconds from publisher or subscriber ?
>
> also is there a way to perform intersection of events based on grouping or
> time window ?
>
>
> Thanks
> Jay
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Grainier Perera
Senior Software Engineer
Mobile : +94716122384
WSO2 Inc. | http://wso2.com
lean.enterprise.middleware
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to