I want this to listen for events coming out of the eventstore so that i can pretend to update a readmodel or two.
My understanding is that to do this I would subscribe to a stream.
Issue is SubscribeToAll yields an access denied error
SubscribeToStream wants the name of a stream…
which is troublesome as the stream names being created are agregateName-Id - so there appears to be a stream per aggregate instance? Can’t I just subscribe to all testAggregate or is there a way to subscibe to the events themselves?
Can anyone advice me on what my next steps should be?
I want to subscribe to all WoftamEvents so that I can update the WoftamReadModel or whatever I call it…
I believe so without reviewing the exact code you are using. From an Event Store perspective its just a byte [] and that is decided by you (though we recommend json :))
Out of curiosity, by “wikiWikiWahDidntJustHappen”, do you mean “received 5 ‘minutepassed events’ without receiving a wikiWikiWahJustHappenedEvent”? Or something else…
No worries. To help you along a bit, the internal projection that does the $et streams is the equivalent of:
fromAll().
when({
$any : function(s,e) { linkTo(e.eventType, e); }
})
This makes a stream per event type which is quite useful in many scenarios as subscribers are interested in event type regardless of stream the event came into.