Take this simple projection:
fromStreams('$et-EventType1', '$et-EventType2')
.when({
$init: function(s, e) {
return {
count: 0
};
},
$any: function(s, e) {
s.count++;
if( s.count > 1000000){ //this could be a date range as well
//start doing stuff
}
}
);
Assume that $et-EventType2 has millions of events, but we aren’t interested in most of these events.
is it possible to start a projection from the a set position (or event the last position) rather than having to trawl through millions of events?