Modelling Streams in EventStore

Following the advice from the EventStore blog (https://geteventstore.com/blog/20130210/the-cost-of-creating-a-stream/) it seems that the recommended way to model streams is to create one for each instance of an aggregate type.

So, assuming that are following the DDD school of modelling aggregates i.e. per bounded context would this mean that we have the following stream ids (assuming we have Purchasing and Shipping bounded contexts)?

“PurchaseOrder-{21765}”

“PurchaseOrder-{98908}”

“PurchaseOrder-{80980}”

“ShippingOrder-{500754}”

“ShippingOrder-{456464}”

“ShippingOrder-{128333}”

Yes…:slight_smile:

OK, so I have, say, a service that is interested in PurchaseOrder aggregates being created and updated I’ll need to create a projection in EventStore that emits these events from all PurchaseOrder streams?

Have I understood this correctly?

There is a built in one that does that (by-category)

Great. Thanks, Greg.

Like Greg said, you get built in Streams out of the box by category like so

$ce-PurchaseOrder

$ce-ShippingOrder

Or you can create specific projections like you said…Then you can subscribe to them through a client using one of the subscription options.