Is it possible to search for a stream not by StreamId but by some another Stream attribute? For example, if every stream has CustomerId in the Headers and I would like to search for all the streams with the particular CustomerId.
In the Event Store streams are like documents in a document database. They are extremely cheap to create. The database assumes that you will have many many millions of streams. Also like in a document database streams are the parition point.
EventStoreDB is an industrial-strength Event Sourcing database that stores your critical data in streams of immutable events. It was built from the ground up for Event Sourcing and offers an unrivaled solution for building event-sourced systems.
Event stores are designed to support retrieval exclusively by the key of the entity. To support retrieval by other attributes, data is indexed in an eventually consistent, de-normalized fashion specifically for each use case and in a separate place. So the event-store only stores events and to support querying of any sort indexed projections are utilized. These are sort of like persistent views in a relational database but they can be stored in a simple key-value store. Together, an event-store and a projection store constitute part of the infrastructure behind a CQRS + Event Sourcing architecture. Take a look here and the rest of that blog for more on this subject.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With