Hi!
Thanks for fast response!
Projections offers you the simplest way of doing this.
For instance,
You could write a projection that will link your application's events to a
application specific stream.
if (!String.prototype.startsWith) {
String.prototype.startsWith = function(searchString, position){
position = position || 0;
return this.substr(position, searchString.length) === searchString;
};
}
fromAll()
.when({
$init:function(s,e){
return {
name: ""
}
},
$any:function(s,e){
s.name += e.streamId;
if(e.streamId.startsWith('MyApplication:')){
linkTo('MyApplication', e);
}
return s;
}
})
You could then subscribe to updates from that stream specifically.
Ok, I'll look into this once your website is up again
(geteventstore.com is down, which has all the blog entries).
So right now it is mandatory basically to use projections to do
something like this? But that feature has not been released for
production use yet if I understand it correctly.
The alternative I can think of without using projections is to add
MyApplication as metadata on all events, and let client subscribe to
$all and filter on that. Not as efficient, but doesn't require
projections.
No other alternatives?
regards, Rickard