I need to write a StreamInsight Input Adapter using sqlDependency for watching table. Actually by using SqlDependency we can notify about new rows inserted to the table. so we are planning to implement these using Streaminsight Complex Event Processing. So can anyone help out how to implement these in Input Adapters.
I mean in ProduceEvents() function in InputAdapter do we need to continuously run query on table for changes? Or can we use sqldependency in Input Adapter? if so how to use these.
Thanks, Sandy
I would use an internal queue, that either by notification or by pooling would get all the changes in memory.
Then in the ProduceEvents method you could use the reference code to try and dequeue a change from your local queue and if there's nothing there just continue on a closed loop.