[Dev] [Siddhi] non-matched or expired events in pattern query

2017-09-24 Thread Jayesh Senjaliya
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, e

Re: [Dev] [Siddhi] non-matched or expired events in pattern query

2017-09-25 Thread Grainier Perera
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 > define stream publisher (pid string, time string); >

Re: [Dev] [Siddhi] non-matched or expired events in pattern query

2017-09-26 Thread Jayesh Senjaliya
Hi Grainier, ya, i came across that example page, but i think that does not work in my use-case which is as follow. i have a publish event followed by multiple subscribe event for the same publish job. now i want to catch if certain jobs (publish -> subscribe) has been finished with 10 sec. I hav

Re: [Dev] [Siddhi] non-matched or expired events in pattern query

2017-09-26 Thread Jayesh Senjaliya
sorry bit correction on the following line in *BOLD*. .now i want to catch if certain jobs (publish -> subscribe) has *NOT* been finished with 10 sec. On Tue, Sep 26, 2017 at 7:05 PM, Jayesh Senjaliya wrote: > Hi Grainier, > > ya, i came across that example page, but i think that does not

Re: [Dev] [Siddhi] non-matched or expired events in pattern query

2017-09-27 Thread Gobinath
Hi, If you can use Siddhi 4 snapshot release, it can be done using the new feature 'Absent Pattern' added to Siddhi 4. The query to detect the events that do not match the condition within 10 seconds is given below: from every e1=publisher -> not subscriber[e1.pid == pid] for 10 sec select e1.pid

Re: [Dev] [Siddhi] non-matched or expired events in pattern query

2017-09-28 Thread Jayesh Senjaliya
Hi Gobinath, Thanks for the suggestion about absence pattern, but we wont be able to upgrade to Siddhi 4 anytime soon. I am basically at the point where I can get all the relevant (subscribe) events that happened during the given interval of first arrival of publish events. here AllPublisher = a

Re: [Dev] [Siddhi] non-matched or expired events in pattern query

2017-09-30 Thread Grainier Perera
Hi Jay, Since you are maintaining a jobTable, you can use that to identify completed and non-completed jobs in a given time frame. Refer to the below snippet; @Plan:name('ExecutionPlan') > @Import('subStream:1.0.0') > define stream subStream (pid int, sid int, status string); > @Import('pubSt

Re: [Dev] [Siddhi] non-matched or expired events in pattern query

2017-10-03 Thread Jayesh Senjaliya
Right, this can work. Thanks for providing detailed queries... but there is an issue for me if i remove rows from that table, that can be used by other policies as central temporary repo. so over the weekend i explored the code, and think this can put up the feature to access the expired events i