I have started creating a test application in .Net, that uses EventStore by Greg Young as the backing store for CQRS/ES.
In order to make it easy to load up a full aggregate, I save to a stream with a name of "agg-123". For example for a product aggregate with an id of 553, there would be a stream named "product-553". And then same for an "Order" aggregate, the stream would be named "order-123".
From the rehydrating and saving of events this works well.
I am now attempting to create a listener that will listen to certain streams to then populate a query database. The subscribe methods that I see can only seem to subscribe to "order-123", or "all". I can't see how I would subscribe to "product-" or "order-", or both.
I imagine that either
- I have missed the point with stream names, and have named them wrong
- Have missed a way to choose it, something like "product-*"
- It is expected to subscribe to "all" and filter out what you aren't interested in, although this gives the problem that it also sends all of the "stats" events
Anyone any advice?